 |
ControlService ..msdn Add comment W32 Constants Translate this page |
 |
 |
The ControlService function sends a control code to a service.
|
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL ControlService(
SC_HANDLE hService,
DWORD dwControl,
LPSERVICE_STATUS lpServiceStatus
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER ControlService IN advapi32;
INTEGER hService,;
LONG dwControl,;
STRING @ lpServiceStatus
|
 |
 |
 |
| Parameters: |
 |
hService
[in] Handle to the service. This handle is returned by the OpenService or CreateService function.
dwControl
[in] This parameter can be one of predefined control codes.
lpServiceStatus
[out] Pointer to a SERVICE_STATUS structure that receives the latest service status information. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
The ControlService function asks the Service Control Manager (SCM) to send the requested control code to the service. The SCM sends the code if the service has specified that it will accept the code, and is in a state in which a control code can be sent to it.
See also: OpenService, StartService. |
 |
 |
| Word Index links for the ControlService : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-12-15 12:13:30 | | Modified: | 2004-12-15 12:16:08 | Visited in last 7 days: 19 |