goto done;
}
- /* If a non driver and NULL for lpServiceName, write ObjectName as LocalSystem */
- if ((dwServiceType & SERVICE_WIN32) && (!lpServiceName))
+ /* FIXME: Handle lpServiceStartName propertly! */
+ /* If a non driver and NULL for lpServiceStartName, write ObjectName as LocalSystem */
+ if ((dwServiceType & SERVICE_WIN32) && (!lpServiceStartName))
{
dwError = RegSetValueExW(hServiceKey,
L"ObjectName",
return ERROR_ACCESS_DENIED;
}
- if (lpResumeHandle) dwLastResumeCount = *lpResumeHandle;
+ if (lpResumeHandle)
+ dwLastResumeCount = *lpResumeHandle;
/* FIXME: Lock the service list shared */
DPRINT("*pcbBytesNeeded: %lu\n", dwRequiredSize);
- if (lpResumeHandle) *lpResumeHandle = dwLastResumeCount;
+ if (lpResumeHandle)
+ *lpResumeHandle = dwLastResumeCount;
+
*lpServicesReturned = dwServiceCount;
*pcbBytesNeeded = dwRequiredSize;
KEY_READ,
&hServicesKey);
- if (dwError != ERROR_SUCCESS) return dwError;
+ if (dwError != ERROR_SUCCESS)
+ return dwError;
/* NOTE: Windows calculates the pcbBytesNeeded based on WCHAR strings for
both EnumDependentServicesA and EnumDependentServicesW. So returned pcbBytesNeeded
}
}
- dwError = REnumServicesStatusW(//BindingHandle,
- hSCManager,
+ dwError = REnumServicesStatusW(hSCManager,
dwServiceType,
dwServiceState,
(LPBYTE)lpStatusPtrW,
lpResumeHandle);
/* if no services were returned then we are Done */
- if (*lpServicesReturned == 0) goto Done;
+ if (*lpServicesReturned == 0)
+ goto Done;
lpStatusPtrA = (LPENUM_SERVICE_STATUSA)lpBuffer;
lpStringPtrA = (LPSTR)((ULONG_PTR)lpBuffer +
}
Done:;
- if (lpStatusPtrW) HeapFree(GetProcessHeap(), 0, lpStatusPtrW);
+ if (lpStatusPtrW)
+ HeapFree(GetProcessHeap(), 0, lpStatusPtrW);
DPRINT("REnumServicesStatusA() done (Error %lu)\n", dwError);