Author: ekohl
Date: Sat Nov 12 21:16:20 2011
New Revision: 54369
URL:
http://svn.reactos.org/svn/reactos?rev=54369&view=rev
Log:
[SERVICES]
RControlService returns ERROR_SERVICE_NOT_ACTIVE if the service has not been started.
Modified:
trunk/reactos/base/system/services/rpcserver.c
Modified: trunk/reactos/base/system/services/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sat Nov 12 21:16:20 2011
@@ -646,6 +646,7 @@
return ERROR_INVALID_PARAMETER;
}
+
DWORD
ScmCanonDriverImagePath(DWORD dwStartType,
const wchar_t *lpServiceName,
@@ -1178,6 +1179,10 @@
{
dwControlsAccepted = lpService->Status.dwControlsAccepted;
dwCurrentState = lpService->Status.dwCurrentState;
+
+ /* Return ERROR_SERVICE_NOT_ACTIVE if the service has not been started */
+ if (lpService->lpImage == NULL || dwCurrentState == SERVICE_STOPPED)
+ return ERROR_SERVICE_NOT_ACTIVE;
/* Check the current state before sending a control request */
switch (dwCurrentState)
@@ -2064,9 +2069,10 @@
/* Unlock the service database */
ScmUnlockDatabase();
- /* check if it is marked for deletion */
+ /* Check if it is marked for deletion */
if (lpService->bDeleted)
return ERROR_SERVICE_MARKED_FOR_DELETE;
+
/* Return Error exist */
return ERROR_SERVICE_EXISTS;
}