Author: ekohl
Date: Sat Dec 26 00:38:37 2015
New Revision: 70419
URL:
http://svn.reactos.org/svn/reactos?rev=70419&view=rev
Log:
[SHUTDOWN][WINLOGON]
SHUTDOWN: Fix the hack be calling InitiateSystemShutdownExW instead of ExitWindowsEx.
WINLOGON: Add a hack by calling ExitWindowsEx in BaseInitiateSystemShutdownEx.
Modified:
trunk/reactos/base/applications/shutdown/shutdown.c
trunk/reactos/base/system/winlogon/rpcserver.c
Modified: trunk/reactos/base/applications/shutdown/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
==============================================================================
--- trunk/reactos/base/applications/shutdown/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/shutdown/shutdown.c [iso-8859-1] Sat Dec 26 00:38:37
2015
@@ -342,20 +342,13 @@
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
Modified: trunk/reactos/base/system/winlogon/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/rpcse…
==============================================================================
--- trunk/reactos/base/system/winlogon/rpcserver.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/winlogon/rpcserver.c [iso-8859-1] Sat Dec 26 00:38:37 2015
@@ -21,7 +21,7 @@
{
RPC_STATUS Status;
- TRACE("ScmStartRpcServer() called\n");
+ TRACE("StartRpcServer() called\n");
Status = RpcServerUseProtseqEpW(L"ncacn_np",
10,
@@ -415,7 +415,12 @@
BOOLEAN bRebootAfterShutdown)
{
TRACE("BaseInitiateSystemShutdown()\n");
- return ERROR_SUCCESS;
+ return BaseInitiateSystemShutdownEx(ServerName,
+ lpMessage,
+ dwTimeout,
+ bForceAppsClosed,
+ bRebootAfterShutdown,
+ 0);
}
@@ -425,7 +430,7 @@
BaseAbortSystemShutdown(
PREGISTRY_SERVER_NAME ServerName)
{
- TRACE("\n");
+ TRACE("BaseAbortSystemShutdown()\n");
return ERROR_SUCCESS;
}
@@ -492,8 +497,19 @@
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);
}