Try to implement a working shutdown.

Sorry, I had to disable some code to close user processes in subsystems/win32/csrss/win32csr/exitros.c

svn path=/trunk/; revision=23445
This commit is contained in:
Hervé Poussineau 2006-08-04 15:39:44 +00:00
parent 3008860064
commit 3455731503
3 changed files with 18 additions and 1 deletions

View file

@ -273,6 +273,20 @@ LogoffShutdownThread(LPVOID Parameter)
} }
RevertToSelf(); 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); HeapFree(GetProcessHeap(), 0, LSData);
return 1; return 1;

View file

@ -418,7 +418,7 @@ int WINAPI RestartDialogEx(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, D
int WINAPI LogoffWindowsDialog(DWORD uFlags) int WINAPI LogoffWindowsDialog(DWORD uFlags)
{ {
ERR("LogoffWindowsDialog is UNIMPLEMENTED\n"); ERR("LogoffWindowsDialog is UNIMPLEMENTED\n");
ExitProcess(0); ExitWindowsEx(EWX_LOGOFF, 0);
return 0; return 0;
} }

View file

@ -783,6 +783,9 @@ InternalExitReactos(DWORD ProcessId, DWORD ThreadId, UINT Flags)
return STATUS_ACCESS_DENIED; return STATUS_ACCESS_DENIED;
} }
DPRINT1("FIXME: Need to close all user processes!\n");
return STATUS_SUCCESS;
CallerThread = OpenThread(THREAD_QUERY_INFORMATION, FALSE, ThreadId); CallerThread = OpenThread(THREAD_QUERY_INFORMATION, FALSE, ThreadId);
if (NULL == CallerThread) if (NULL == CallerThread)
{ {