sync to trunk head (37853) (except rbuild changes)
[reactos.git] / reactos / dll / win32 / advapi32 / service / sctrl.c
index 256613d..b78a4a0 100644 (file)
@@ -274,7 +274,7 @@ ScStartService(PSCM_CONTROL_PACKET ControlPacket)
     TRACE("Size: %lu\n", ControlPacket->dwSize);
     TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
 
-    lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
+    lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
     if (lpService == NULL)
     {
         TRACE("Service not found\n");
@@ -317,7 +317,7 @@ ScControlService(PSCM_CONTROL_PACKET ControlPacket)
     TRACE("Size: %lu\n", ControlPacket->dwSize);
     TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
 
-    lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
+    lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
     if (lpService == NULL)
     {
         TRACE("Service not found\n");
@@ -454,7 +454,7 @@ RegisterServiceCtrlHandlerW(LPCWSTR lpServiceName,
     Service = ScLookupServiceByServiceName((LPWSTR)lpServiceName);
     if (Service == NULL)
     {
-        return (SERVICE_STATUS_HANDLE)NULL;
+        return INVALID_HANDLE_VALUE;
     }
 
     Service->HandlerFunction = lpHandlerProc;