Better stub for QueryServiceConfigW
Modified: trunk/reactos/lib/advapi32/service/scm.c

Modified: trunk/reactos/lib/advapi32/service/scm.c
--- trunk/reactos/lib/advapi32/service/scm.c	2005-11-07 04:42:28 UTC (rev 19035)
+++ trunk/reactos/lib/advapi32/service/scm.c	2005-11-07 10:04:41 UTC (rev 19036)
@@ -909,8 +909,17 @@
     LPDWORD                 pcbBytesNeeded)
 {
     DPRINT1("QueryServiceConfigW is unimplemented\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
+    if (lpServiceConfig && cbBufSize >= sizeof(QUERY_SERVICE_CONFIGW))
+    {
+        memset(lpServiceConfig, 0, *pcbBytesNeeded);
+        return TRUE;
+    }
+    else
+    {
+        *pcbBytesNeeded = sizeof(QUERY_SERVICE_CONFIGW);
+        SetLastError(ERROR_INSUFFICIENT_BUFFER);
+        return FALSE;
+    }
 }