Start the reboot process in ExitWindowsEx.
This commit is contained in:
parent
bb66e8a1cf
commit
52f40a9388
@ -412,6 +412,31 @@ static void USER_DoShutdown(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* USER_StartRebootProcess (Internal)
|
||||||
|
*/
|
||||||
|
static BOOL USER_StartRebootProcess(void)
|
||||||
|
{
|
||||||
|
WCHAR winebootW[] = { 'w','i','n','e','b','o','o','t',0 };
|
||||||
|
PROCESS_INFORMATION pi;
|
||||||
|
STARTUPINFOW si;
|
||||||
|
BOOL r;
|
||||||
|
|
||||||
|
memset( &si, 0, sizeof si );
|
||||||
|
si.cb = sizeof si;
|
||||||
|
|
||||||
|
r = CreateProcessW( NULL, winebootW, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
|
||||||
|
if (r)
|
||||||
|
{
|
||||||
|
CloseHandle( pi.hProcess );
|
||||||
|
CloseHandle( pi.hThread );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
MESSAGE("wine: Failed to start wineboot\n");
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* ExitWindowsEx (USER32.@)
|
* ExitWindowsEx (USER32.@)
|
||||||
*/
|
*/
|
||||||
@ -447,6 +472,9 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
|
|||||||
/* USER_DoShutdown will kill all processes except the current process */
|
/* USER_DoShutdown will kill all processes except the current process */
|
||||||
USER_DoShutdown();
|
USER_DoShutdown();
|
||||||
|
|
||||||
|
if (flags & EWX_REBOOT)
|
||||||
|
USER_StartRebootProcess();
|
||||||
|
|
||||||
if (result) ExitKernel16();
|
if (result) ExitKernel16();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user