[SERVICES] Update the service status after unloading a driver

Update the service status after unloading the driver and pass the new status to the caller.

CORE-14269
This commit is contained in:
Eric Kohl 2018-02-10 17:02:23 +01:00
parent 3003471e64
commit 85b71880fa

View file

@ -306,8 +306,16 @@ ScmControlDriver(PSERVICE lpService,
dwError = ScmUnloadDriver(lpService);
if (dwError == ERROR_SUCCESS)
{
lpService->Status.dwControlsAccepted = 0;
lpService->Status.dwCurrentState = SERVICE_STOPPED;
lpService->Status.dwControlsAccepted = 0;
lpService->Status.dwWin32ExitCode = ERROR_SUCCESS;
if (lpServiceStatus != NULL)
{
RtlCopyMemory(lpServiceStatus,
&lpService->Status,
sizeof(SERVICE_STATUS));
}
}
break;