[IDL][WINLOGON] Rename locally used functions of the winreg rpc interface
[reactos.git] / base / system / winlogon / rpcserver.c
index 9c71318..30de6e8 100644 (file)
@@ -6,14 +6,13 @@
  * PROGRAMMERS:     Eric Kohl
  */
 
-/* INCLUDES *****************************************************************/
+/* INCLUDES ******************************************************************/
 
 #include "winlogon.h"
 
 #include <rpc.h>
 #include <winreg_s.h>
 
-
 /* FUNCTIONS *****************************************************************/
 
 BOOL
@@ -21,10 +20,10 @@ StartRpcServer(VOID)
 {
     RPC_STATUS Status;
 
-    TRACE("ScmStartRpcServer() called\n");
+    TRACE("StartRpcServer() called\n");
 
     Status = RpcServerUseProtseqEpW(L"ncacn_np",
-                                    10,
+                                    RPC_C_PROTSEQ_MAX_REQS_DEFAULT,
                                     L"\\pipe\\winreg",
                                     NULL);
     if (Status != RPC_S_OK)
@@ -262,10 +261,10 @@ BaseRegLoadKey(
 }
 
 
-/* Function 14 */
+/* Function 14 - Not used on wire */
 void
 __stdcall
-Opnum14NotImplemented(
+BaseRegNotifyChangeKeyValue(
     handle_t IDL_handle)
 {
     TRACE("\n");
@@ -415,7 +414,12 @@ BaseInitiateSystemShutdown(
     BOOLEAN bRebootAfterShutdown)
 {
     TRACE("BaseInitiateSystemShutdown()\n");
-    return ERROR_SUCCESS;
+    return BaseInitiateSystemShutdownEx(ServerName,
+                                        lpMessage,
+                                        dwTimeout,
+                                        bForceAppsClosed,
+                                        bRebootAfterShutdown,
+                                        0);
 }
 
 
@@ -425,8 +429,11 @@ __stdcall
 BaseAbortSystemShutdown(
     PREGISTRY_SERVER_NAME ServerName)
 {
-    TRACE("\n");
-    return ERROR_SUCCESS;
+    TRACE("BaseAbortSystemShutdown()\n");
+
+    //FIXME: Verify that the caller actually has the correct privileges
+
+    return TerminateSystemShutdown();
 }
 
 
@@ -455,10 +462,10 @@ OpenCurrentConfig(
 }
 
 
-/* Function 28 */
+/* Function 28 - Not used on wire */
 void
 __stdcall
-Opnum28NotImplemented(
+OpenDynData(
     handle_t IDL_handle)
 {
     TRACE("\n");
@@ -492,8 +499,20 @@ 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);
+
+    //FIXME: Verify that the caller actually has the correct privileges
+
+    return StartSystemShutdown((PUNICODE_STRING)lpMessage,
+                               dwTimeout,
+                               bForceAppsClosed,
+                               bRebootAfterShutdown,
+                               dwReason);
 }