[SERVICES] Fix the initial service status

- The initial dwWin32ExitCode for a disabled service is ERROR_SERVICE_DISABLED and ERROR_SRVICE_NEVER_STARTED for non-disabled services.
- The initial dwWaitHint is 2000 (2 seconds) for (user-mode) services and 0 for drivers.
- Move all driver-related code to driver.c.
This commit is contained in:
Eric Kohl 2018-02-12 14:58:02 +01:00
parent 12b0dfb71e
commit e917471e04
4 changed files with 48 additions and 21 deletions

View file

@ -2279,13 +2279,13 @@ RCreateServiceW(
/* Allocate a new service entry */
dwError = ScmCreateNewServiceRecord(lpServiceName,
&lpService);
&lpService,
dwServiceType,
dwStartType);
if (dwError != ERROR_SUCCESS)
goto done;
/* Fill the new service entry */
lpService->Status.dwServiceType = dwServiceType;
lpService->dwStartType = dwStartType;
lpService->dwErrorControl = dwErrorControl;
/* Fill the display name */