{
if (bInitialize)
{
- /* HACK - the global constructors don't run, so I placement new them here */
- new (&gModule) CExplorerModule;
- new (&gWinModule) CAtlWinModule;
- new (&_AtlBaseModule) CAtlBaseModule;
- new (&_AtlComModule) CAtlComModule;
-
gModule.Init(ObjectMap, hInstance, NULL);
}
else
}
}
-#if !WIN7_COMPAT_MODE
+#if !WIN7_DEBUG_MODE
static BOOL
-SetShellReadyEvent(IN LPCTSTR lpEventName)
+SetShellReadyEvent(IN LPCWSTR lpEventName)
{
HANDLE hEvent;
- hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, lpEventName);
+ hEvent = OpenEventW(EVENT_MODIFY_STATE, FALSE, lpEventName);
if (hEvent != NULL)
{
SetEvent(hEvent);
MINIMIZEDMETRICS mm;
mm.cbSize = sizeof(mm);
- if (!SystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
+ if (!SystemParametersInfoW(SPI_GETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
{
- ERR("SystemParametersInfo failed with %lu\n", GetLastError());
+ ERR("SystemParametersInfoW failed with %lu\n", GetLastError());
return;
}
if (bHide)
mm.iArrange |= ARW_HIDE;
else
mm.iArrange &= ~ARW_HIDE;
- if (!SystemParametersInfo(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
- ERR("SystemParametersInfo failed with %lu\n", GetLastError());
+ if (!SystemParametersInfoW(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
+ ERR("SystemParametersInfoW failed with %lu\n", GetLastError());
}
+#endif
+#if !WIN7_COMPAT_MODE
static INT
StartWithCommandLine(IN HINSTANCE hInstance)
{
{
InitializeAtlModule(hInstance, TRUE);
- if (RegOpenKey(HKEY_CURRENT_USER,
+ if (RegOpenKeyW(HKEY_CURRENT_USER,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
&hkExplorer) != ERROR_SUCCESS)
{
WCHAR Message[256];
- LoadString(hInstance, IDS_STARTUP_ERROR, Message, 256);
+ LoadStringW(hInstance, IDS_STARTUP_ERROR, Message, _countof(Message));
MessageBox(NULL, Message, NULL, MB_ICONERROR);
return 1;
}
hExplorerInstance = hInstance;
hProcessHeap = GetProcessHeap();
- LoadAdvancedSettings();
+ LoadTaskBarSettings();
InitCommonControls();
OleInitialize(NULL);
-#if !WIN7_COMPAT_MODE
+#if !WIN7_DEBUG_MODE
ProcessStartupItems();
+#endif
+#if !WIN7_COMPAT_MODE
/* Initialize shell dde support */
_ShellDDEInit(TRUE);
#endif
CComPtr<ITrayWindow> Tray;
CreateTrayWindow(&Tray);
-#if !WIN7_COMPAT_MODE
+#if !WIN7_DEBUG_MODE
/* This not only hides the minimized window captions in the bottom
left screen corner, but is also needed in order to receive
HSHELL_* notification messages (which are required for taskbar
hShellDesktop = DesktopCreateWindow(Tray);
/* WinXP: Notify msgina to hide the welcome screen */
- if (!SetShellReadyEvent(TEXT("msgina: ShellReadyEvent")))
- SetShellReadyEvent(TEXT("Global\\msgina: ShellReadyEvent"));
+ if (!SetShellReadyEvent(L"msgina: ShellReadyEvent"))
+ SetShellReadyEvent(L"Global\\msgina: ShellReadyEvent");
#endif
if (Tray != NULL)
{
TrayMessageLoop(Tray);
-#if !WIN7_COMPAT_MODE
+#if !WIN7_DEBUG_MODE
HideMinimizedWindows(FALSE);
#endif
}
-#if !WIN7_COMPAT_MODE
+#if !WIN7_DEBUG_MODE
if (hShellDesktop != NULL)
DesktopDestroyShellWindow(hShellDesktop);
#endif
IN LPTSTR lpCmdLine,
IN INT nCmdShow)
{
-#if !WIN7_COMPAT_MODE
- BOOL CreateShellDesktop = FALSE;
-
- TRACE("Explorer starting... Commandline: %S\n", lpCmdLine);
-
/*
* Set our shutdown parameters: we want to shutdown the very last,
* but before any TaskMgr instance (which has a shutdown level of 1).
*/
SetProcessShutdownParameters(2, 0);
+ InitRSHELL();
+
+#if !WIN7_COMPAT_MODE
+ BOOL CreateShellDesktop = FALSE;
+
+ TRACE("Explorer starting... Commandline: %S\n", lpCmdLine);
+
if (GetShellWindow() == NULL)
CreateShellDesktop = TRUE;