Sending a control code to a serviceΒΆ
control_service() |
Send a control code to a service |
SYNTAX
control_service(service_handle, code )
Sends a control code to the specified service.
service_handle |
A handle returned by create_service() or open_service(). |
code |
The control code to be sent to the service. Some standard codes, which are defined in services.h, are listed below. See the Windows API for a full list. SERVICE_CONTROL_CONTINUE
SERVICE_CONTROL_INTERROGATE
SERVICE_CONTROL_PAUSE
SERVICE_CONTROL_PARAMCHANGE
SERVICE_CONTROL_STOP
Codes 128-255 are for application use. |
The function returns 0 if successful, or a non-zero value if an error occurs. The Windows error code is stored in sys.Errno.
RELATED TOPICS |