Author: hpoussin
Date: Fri Aug 4 19:39:44 2006
New Revision: 23445
URL:
http://svn.reactos.org/svn/reactos?rev=23445&view=rev
Log:
Try to implement a working shutdown.
Sorry, I had to disable some code to close user processes in
subsystems/win32/csrss/win32csr/exitros.c
Modified:
trunk/reactos/base/system/winlogon/sas.c
trunk/reactos/dll/win32/shell32/dialogs.c
trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c
Modified: trunk/reactos/base/system/winlogon/sas.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/sas.c…
==============================================================================
--- trunk/reactos/base/system/winlogon/sas.c (original)
+++ trunk/reactos/base/system/winlogon/sas.c Fri Aug 4 19:39:44 2006
@@ -272,6 +272,20 @@
return 0;
}
RevertToSelf();
+
+ /* This is not right (see top of reactos/dll/win32/user32/misc/exit.c),
+ * but this should be enough atm */
+ switch (LSData->Flags & EWX_ACTION_MASK)
+ {
+ case EWX_SHUTDOWN:
+ NtShutdownSystem(ShutdownNoReboot);
+ break;
+ case EWX_REBOOT:
+ NtShutdownSystem(ShutdownReboot);
+ break;
+ default:
+ UNIMPLEMENTED;
+ }
HeapFree(GetProcessHeap(), 0, LSData);
Modified: trunk/reactos/dll/win32/shell32/dialogs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/dialogs.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/dialogs.c (original)
+++ trunk/reactos/dll/win32/shell32/dialogs.c Fri Aug 4 19:39:44 2006
@@ -418,7 +418,7 @@
int WINAPI LogoffWindowsDialog(DWORD uFlags)
{
ERR("LogoffWindowsDialog is UNIMPLEMENTED\n");
- ExitProcess(0);
+ ExitWindowsEx(EWX_LOGOFF, 0);
return 0;
}
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/exitros.c Fri Aug 4 19:39:44 2006
@@ -783,6 +783,9 @@
return STATUS_ACCESS_DENIED;
}
+ DPRINT1("FIXME: Need to close all user processes!\n");
+ return STATUS_SUCCESS;
+
CallerThread = OpenThread(THREAD_QUERY_INFORMATION, FALSE, ThreadId);
if (NULL == CallerThread)
{