Forward ChangeServiceConfig2W call to services.exe
Modified: trunk/reactos/include/idl/svcctl.idl
Modified: trunk/reactos/lib/advapi32/advapi32.def
Modified: trunk/reactos/lib/advapi32/service/scm.c
Modified: trunk/reactos/subsys/system/services/rpcserver.c

Modified: trunk/reactos/include/idl/svcctl.idl
--- trunk/reactos/include/idl/svcctl.idl	2005-12-30 01:41:02 UTC (rev 20455)
+++ trunk/reactos/include/idl/svcctl.idl	2005-12-30 10:29:07 UTC (rev 20456)
@@ -324,7 +324,11 @@
   /* ScmrChangeServiceConfig2A */
 
   /* Function 37 */
-  /* ScmrChangeServiceConfig2W */
+  DWORD ScmrChangeServiceConfig2W([in] handle_t BindingHandle,
+                                  [in] SC_HANDLE hService,
+                                  [in] DWORD dwInfoLevel,
+                                  [in, size_is(dwInfoSize)] unsigned char *lpInfo,
+                                  [in] DWORD dwInfoSize);
 
   /* Function 38 */
   /* ScmrQueryServiceConfig2A */

Modified: trunk/reactos/lib/advapi32/advapi32.def
--- trunk/reactos/lib/advapi32/advapi32.def	2005-12-30 01:41:02 UTC (rev 20455)
+++ trunk/reactos/lib/advapi32/advapi32.def	2005-12-30 10:29:07 UTC (rev 20456)
@@ -59,7 +59,7 @@
 BuildTrusteeWithSidW@8
 ;CancelOverlappedAccess@4
 ;ChangeServiceConfig2A@12
-;ChangeServiceConfig2W@12
+ChangeServiceConfig2W@12
 ChangeServiceConfigA@44
 ChangeServiceConfigW@44
 CheckTokenMembership@12

Modified: trunk/reactos/lib/advapi32/service/scm.c
--- trunk/reactos/lib/advapi32/service/scm.c	2005-12-30 01:41:02 UTC (rev 20455)
+++ trunk/reactos/lib/advapi32/service/scm.c	2005-12-30 10:29:07 UTC (rev 20456)
@@ -78,6 +78,53 @@
 
 
 /**********************************************************************
+ *  ChangeServiceConfig2W
+ *
+ * @implemented
+ */
+BOOL WINAPI
+ChangeServiceConfig2W(SC_HANDLE hService,
+                      DWORD dwInfoLevel,
+                      LPVOID lpInfo)
+{
+    DWORD lpInfoSize;
+    DWORD dwError;
+
+    DPRINT("ChangeServiceConfig2W() called\n");
+
+    /* Determine the length of the lpInfo parameter */
+    switch (dwInfoLevel)
+    {
+        case SERVICE_CONFIG_DESCRIPTION:
+            lpInfoSize = sizeof(SERVICE_DESCRIPTION);
+        case SERVICE_CONFIG_FAILURE_ACTIONS:
+            lpInfoSize = sizeof(SERVICE_FAILURE_ACTIONS);
+        default:
+            DPRINT1("Unknown info level 0x%lx\n", dwInfoLevel);
+            SetLastError(ERROR_INVALID_PARAMETER);
+            return FALSE;
+    }
+
+    if (lpInfo == NULL)
+        return TRUE;
+
+    HandleBind();
+
+    dwError = ScmrChangeServiceConfig2W(BindingHandle,
+                                        (unsigned int)hService,
+                                        dwInfoLevel,
+                                        lpInfo,
+                                        lpInfoSize);
+    if (dwError != ERROR_SUCCESS)
+    {
+        DPRINT1("ScmrChangeServiceConfig2W() failed (Error %lu)\n", dwError);
+        SetLastError(dwError);
+        return FALSE;
+    }
+}
+
+
+/**********************************************************************
  *  ChangeServiceConfigA
  *
  * @implemented
@@ -1553,7 +1600,7 @@
 #if 0
     DWORD dwError;
 
-    DPRINT("StartServiceW()\n", ScLock);
+    DPRINT("StartServiceW()\n");
 
     HandleBind();
 

Modified: trunk/reactos/subsys/system/services/rpcserver.c
--- trunk/reactos/subsys/system/services/rpcserver.c	2005-12-30 01:41:02 UTC (rev 20455)
+++ trunk/reactos/subsys/system/services/rpcserver.c	2005-12-30 10:29:07 UTC (rev 20456)
@@ -2061,7 +2061,16 @@
 
 
 /* Function 37 */
-/* ScmrChangeServiceConfig2W */
+unsigned long
+ScmrChangeServiceConfig2W(handle_t BindingHandle,
+                          unsigned int hService,
+                          unsigned long dwInfoLevel,
+                          unsigned char *lpInfo,
+                          unsigned long dwInfoSize)
+{
+    DPRINT1("ScmrChangeServiceConfig2W() is unimplemented\n");
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
 
 
 /* Function 38 */