https://git.reactos.org/?p=reactos.git;a=commitdiff;h=85b71880fa000b24f2b2b…
commit 85b71880fa000b24f2b2bc88b15d36cb039f00db
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Feb 10 17:02:23 2018 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Feb 10 17:02:23 2018 +0100
[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
---
base/system/services/driver.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/base/system/services/driver.c b/base/system/services/driver.c
index 4248ac95c9..de8bfc1aa3 100644
--- a/base/system/services/driver.c
+++ b/base/system/services/driver.c
@@ -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;