diff options
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r-- | src/Common/Dlgcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index c2e15390..810b6e8a 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -10017,7 +10017,7 @@ BOOL EnableWow64FsRedirection (BOOL enable) } -BOOL RestartComputer (void) +BOOL RestartComputer (BOOL bShutdown) { TOKEN_PRIVILEGES tokenPrivil; HANDLE hTkn; @@ -10038,7 +10038,7 @@ BOOL RestartComputer (void) return false; } - if (!ExitWindowsEx (EWX_REBOOT, + if (!ExitWindowsEx (bShutdown? EWX_POWEROFF: EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED)) { CloseHandle(hTkn); |