merge from trunk: launch shell DDE server
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
--- branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
2005-04-02 10:59:49 UTC (rev 14435)
+++ branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
2005-04-02 11:00:58 UTC (rev 14436)
@@ -1,5 +1,5 @@
/*
- * Copyright 2003, 2004 Martin Fuchs
+ * Copyright 2003, 2004, 2005 Martin Fuchs
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -35,6 +35,9 @@
#include <locale.h> // for setlocale()
+DynamicLoadLibFct<void(__stdcall*)(BOOL)>
g_SHDOCVW_ShellDDEInit(TEXT("SHDOCVW"), 118);
+
+
ExplorerGlobals g_Globals;
@@ -696,6 +699,10 @@
// another undocumented event: "Global\\msgina:
ReturnToWelcome"
if (!SetShellReadyEvent(TEXT("msgina:
ShellReadyEvent")))
SetShellReadyEvent(TEXT("Global\\msgina:
ShellReadyEvent"));
+
+ // launch the shell DDE server
+ if (g_SHDOCVW_ShellDDEInit)
+ (*g_SHDOCVW_ShellDDEInit)(TRUE);
}
@@ -727,5 +734,9 @@
int ret = explorer_main(hInstance, lpCmdLine, nShowCmd);
+ // shutdown the shell DDE server
+ if (g_SHDOCVW_ShellDDEInit)
+ (*g_SHDOCVW_ShellDDEInit)(FALSE);
+
return ret;
}
merge from trunk: hide login screen to make the login on XP faster
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
--- branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
2005-04-02 10:48:16 UTC (rev 14434)
+++ branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
2005-04-02 10:59:49 UTC (rev 14435)
@@ -601,6 +601,19 @@
#endif // __MINGW && UNICODE
+static bool SetShellReadyEvent(LPCTSTR evtName)
+{
+ HANDLE hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, evtName);
+ if (!hEvent)
+ return false;
+
+ SetEvent(hEvent);
+ CloseHandle(hEvent);
+
+ return true;
+}
+
+
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nShowCmd)
{
CONTEXT("WinMain()");
@@ -646,11 +659,15 @@
}
startup_desktop = TRUE;
- } else
+ } else {
// create desktop window and task bar only, if there is
no other shell and we are
// the first explorer instance
+ // MS Explorer looks additionally into the registry
entry HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\shell,
+ // to decide wether it is currently configured as shell
application.
startup_desktop = !any_desktop_running;
+ }
+
bool autostart = !any_desktop_running;
// disable autostart if the SHIFT key is pressed
@@ -674,6 +691,14 @@
if (_tcsstr(lpCmdLine,TEXT("-noautostart")))
autostart = false;
+ if (startup_desktop) {
+ // hide the XP login screen (Credit to Nicolas Escuder)
+ // another undocumented event: "Global\\msgina:
ReturnToWelcome"
+ if (!SetShellReadyEvent(TEXT("msgina:
ShellReadyEvent")))
+ SetShellReadyEvent(TEXT("Global\\msgina:
ShellReadyEvent"));
+ }
+
+
g_Globals.init(hInstance);
// initialize COM and OLE before creating the desktop window
@@ -684,6 +709,7 @@
g_Globals._hwndDesktop = DesktopWindow::Create();
+ /**TODO launching autostart programs can be moved into a
background thread. */
if (autostart) {
char* argv[] = {"", "s"}; // call startup
routine in SESSION_START mode
startup(2, argv);