[SERVICES]
authorEric Kohl <eric.kohl@reactos.org>
Fri, 22 Apr 2011 15:18:31 +0000 (15:18 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 22 Apr 2011 15:18:31 +0000 (15:18 +0000)
RChangeServiceConfig2W: Use the error code of a call to RegSetValueExW.

svn path=/trunk/; revision=51429

reactos/base/system/services/rpcserver.c

index c1c717e..8e5da23 100644 (file)
@@ -4508,13 +4508,12 @@ DWORD RChangeServiceConfig2W(
             lpServiceDescription->lpDescription != NULL)
         {
             DPRINT("Setting value %S\n", lpServiceDescription->lpDescription);
-            RegSetValueExW(hServiceKey,
-                           L"Description",
-                           0,
-                           REG_SZ,
-                           (LPBYTE)lpServiceDescription->lpDescription,
-                           (wcslen(lpServiceDescription->lpDescription) + 1) * sizeof(WCHAR));
-
+            dwError = RegSetValueExW(hServiceKey,
+                                     L"Description",
+                                     0,
+                                     REG_SZ,
+                                     (LPBYTE)lpServiceDescription->lpDescription,
+                                     (wcslen(lpServiceDescription->lpDescription) + 1) * sizeof(WCHAR));
             if (dwError != ERROR_SUCCESS)
                 goto done;
         }