mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:33:00 +00:00
[SERVICES] Merge ScmControlService() and ScmSendStartCommand() together (#7392)
In addition: - Acquire ControlServiceCriticalSection just before doing the pipe operations, and release it just after. - SAL2-annotate ScmControlService(). - Re-order the ScmControlService() parameters in a more natural way (image comm pipe, service name, control code; then: arguments for the control command). - Improve some DPRINTs.
This commit is contained in:
parent
38f21f93e9
commit
0f7b021fe6
3 changed files with 101 additions and 257 deletions
|
@ -1187,8 +1187,8 @@ RControlService(
|
|||
/* Send control code to the service */
|
||||
dwError = ScmControlService(lpService->lpImage->hControlPipe,
|
||||
lpService->lpServiceName,
|
||||
(SERVICE_STATUS_HANDLE)lpService,
|
||||
dwControl);
|
||||
dwControl,
|
||||
(SERVICE_STATUS_HANDLE)lpService);
|
||||
|
||||
/* Return service status information */
|
||||
RtlCopyMemory(lpServiceStatus,
|
||||
|
@ -1626,8 +1626,8 @@ ScmStopThread(PVOID pParam)
|
|||
DPRINT("Stopping the dispatcher thread for service %S\n", lpService->lpServiceName);
|
||||
ScmControlService(lpService->lpImage->hControlPipe,
|
||||
L"",
|
||||
(SERVICE_STATUS_HANDLE)lpService,
|
||||
SERVICE_CONTROL_STOP);
|
||||
SERVICE_CONTROL_STOP,
|
||||
(SERVICE_STATUS_HANDLE)lpService);
|
||||
}
|
||||
|
||||
/* Lock the service database exclusively */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue