mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +00:00
[SERVICES]
RControlService returns ERROR_SERVICE_NOT_ACTIVE if the service has not been started. svn path=/trunk/; revision=54369
This commit is contained in:
parent
62089cfa4b
commit
2c472c9d01
1 changed files with 7 additions and 1 deletions
|
@ -646,6 +646,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
ScmCanonDriverImagePath(DWORD dwStartType,
|
ScmCanonDriverImagePath(DWORD dwStartType,
|
||||||
const wchar_t *lpServiceName,
|
const wchar_t *lpServiceName,
|
||||||
|
@ -1179,6 +1180,10 @@ DWORD RControlService(
|
||||||
dwControlsAccepted = lpService->Status.dwControlsAccepted;
|
dwControlsAccepted = lpService->Status.dwControlsAccepted;
|
||||||
dwCurrentState = lpService->Status.dwCurrentState;
|
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 */
|
/* Check the current state before sending a control request */
|
||||||
switch (dwCurrentState)
|
switch (dwCurrentState)
|
||||||
{
|
{
|
||||||
|
@ -2064,9 +2069,10 @@ DWORD RCreateServiceW(
|
||||||
/* Unlock the service database */
|
/* Unlock the service database */
|
||||||
ScmUnlockDatabase();
|
ScmUnlockDatabase();
|
||||||
|
|
||||||
/* check if it is marked for deletion */
|
/* Check if it is marked for deletion */
|
||||||
if (lpService->bDeleted)
|
if (lpService->bDeleted)
|
||||||
return ERROR_SERVICE_MARKED_FOR_DELETE;
|
return ERROR_SERVICE_MARKED_FOR_DELETE;
|
||||||
|
|
||||||
/* Return Error exist */
|
/* Return Error exist */
|
||||||
return ERROR_SERVICE_EXISTS;
|
return ERROR_SERVICE_EXISTS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue