mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[SHUTDOWN][WINLOGON]
SHUTDOWN: Fix the hack be calling InitiateSystemShutdownExW instead of ExitWindowsEx. WINLOGON: Add a hack by calling ExitWindowsEx in BaseInitiateSystemShutdownEx. svn path=/trunk/; revision=70419
This commit is contained in:
parent
f17fe51f38
commit
1ce137ac92
2 changed files with 28 additions and 19 deletions
|
@ -342,20 +342,13 @@ int wmain(int argc, WCHAR *argv[])
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
** HACK: When InitiateSystemShutdownExW will become really implemented,
|
||||
** activate this line and delete the other...
|
||||
**
|
||||
if(!InitiateSystemShutdownExW(opts.remote_system,
|
||||
opts.message,
|
||||
opts.shutdown_delay,
|
||||
opts.force,
|
||||
opts.restart,
|
||||
opts.reason))
|
||||
***/
|
||||
if (!ExitWindowsEx((opts.shutdown ? EWX_SHUTDOWN : EWX_REBOOT) |
|
||||
(opts.force ? EWX_FORCE : 0),
|
||||
opts.reason))
|
||||
/* Initiate the shutdown */
|
||||
if (!InitiateSystemShutdownExW(opts.remote_system,
|
||||
opts.message,
|
||||
opts.shutdown_delay,
|
||||
opts.force,
|
||||
opts.restart,
|
||||
opts.reason))
|
||||
{
|
||||
/*
|
||||
* If there is an error, give the proper output depending
|
||||
|
|
|
@ -21,7 +21,7 @@ StartRpcServer(VOID)
|
|||
{
|
||||
RPC_STATUS Status;
|
||||
|
||||
TRACE("ScmStartRpcServer() called\n");
|
||||
TRACE("StartRpcServer() called\n");
|
||||
|
||||
Status = RpcServerUseProtseqEpW(L"ncacn_np",
|
||||
10,
|
||||
|
@ -415,7 +415,12 @@ BaseInitiateSystemShutdown(
|
|||
BOOLEAN bRebootAfterShutdown)
|
||||
{
|
||||
TRACE("BaseInitiateSystemShutdown()\n");
|
||||
return ERROR_SUCCESS;
|
||||
return BaseInitiateSystemShutdownEx(ServerName,
|
||||
lpMessage,
|
||||
dwTimeout,
|
||||
bForceAppsClosed,
|
||||
bRebootAfterShutdown,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -425,7 +430,7 @@ __stdcall
|
|||
BaseAbortSystemShutdown(
|
||||
PREGISTRY_SERVER_NAME ServerName)
|
||||
{
|
||||
TRACE("\n");
|
||||
TRACE("BaseAbortSystemShutdown()\n");
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -492,8 +497,19 @@ BaseInitiateSystemShutdownEx(
|
|||
BOOLEAN bRebootAfterShutdown,
|
||||
ULONG dwReason)
|
||||
{
|
||||
TRACE("\n");
|
||||
return ERROR_SUCCESS;
|
||||
TRACE("BaseInitiateSystemShutdownEx()\n");
|
||||
TRACE(" Message: %wZ\n", lpMessage);
|
||||
TRACE(" Timeout: %lu\n", dwTimeout);
|
||||
TRACE(" Force: %d\n", bForceAppsClosed);
|
||||
TRACE(" Reboot: %d\n", bRebootAfterShutdown);
|
||||
TRACE(" Reason: %lu\n", dwReason);
|
||||
|
||||
// return ERROR_SUCCESS;
|
||||
|
||||
/* FIXME */
|
||||
return ExitWindowsEx((bRebootAfterShutdown ? EWX_REBOOT : EWX_SHUTDOWN) |
|
||||
(bForceAppsClosed ? EWX_FORCE : 0),
|
||||
dwReason);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue