Name
QueryServiceStatus( )
Synopsis
Queries a service for status.
status = QueryServiceStatus(handle)
Parameters
-
handle Handle to the service, as obtained from
win32service.OpenService().
Result
The result is a tuple with the following fields:
-
serviceType A combination of the following flags:
-
win32service.SERVICE_WIN32_OWN_PROCESS Indicates a service that runs in its own process.
-
win32service.SERVICE_WIN32_SHARE_PROCESS Indicates a service that shares a process with other services.
-
win32service.SERVICE_KERNEL_DRIVER Indicates a device driver.
-
win32service.SERVICE_FILE_SYSTEM_DRIVER Indicates a filesystem driver.
-
win32service.SERVICE_INTERACTIVE_PROCESS A service process that can interact with the desktop.
-
-
currentState A combination of the following flags:
-
win32service.SERVICE_STOPPED The service isn’t running.
-
win32service.SERVICE_START_PENDING The service is starting.
-
win32service.SERVICE_STOP_PENDING The service is stopping.
-
win32service.SERVICE_RUNNING The service is running.
-
win32service.SERVICE_CONTINUE_PENDING The service continue is pending.
-
win32service.SERVICE_PAUSE_PENDING The service pause is pending.
-
win32service.SERVICE_PAUSED The service is paused.
-
-
controlsAccepted A set of flags indicating the controls the service accepts:
-
win32service.SERVICE_ACCEPT_STOP The service can be stopped. This enables the
SERVICE_CONTROL_STOPvalue.-
win32service.SERVICE_ACCEPT_PAUSE_CONTINUE The service can be paused and continued. This enables the
SERVICE_CONTROL_PAUSEandSERVICE_CONTROL_CONTINUE ...
-
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access