The SERVICE_STATUS structure contains information about a service. The ControlService, EnumDependentServices, EnumServicesStatus, and QueryServiceStatus functions use this structure to return information about a service. A service uses this structure in the SetServiceStatus function to report its current status to the service control manager.
typedef struct _SERVICE_STATUS { // ss
DWORD dwServiceType;
DWORD dwCurrentState;
DWORD dwControlsAccepted;
DWORD dwWin32ExitCode;
DWORD dwServiceSpecificExitCode;
DWORD dwCheckPoint;
DWORD dwWaitHint;
} SERVICE_STATUS, *LPSERVICE_STATUS;
|
Value |
Meaning |
|
SERVICE_WIN32_OWN_PROCESS |
A service type flag that indicates a Win32 service that runs in its own process. |
|
SERVICE_WIN32_SHARE_PROCESS |
A service type flag that indicates a Win32 service that shares a process with other services. |
|
SERVICE_KERNEL_DRIVER |
A service type flag that indicates a Windows NT device driver. |
|
SERVICE_FILE_SYSTEM_DRIVER |
A service type flag that indicates a Windows NT file system driver. |
|
SERVICE_INTERACTIVE_PROCESS |
A flag that indicates a Win32 service process that can interact with the desktop. |
|
Value |
Meaning |
|
SERVICE_STOPPED |
The service is not running. |
|
SERVICE_START_PENDING |
The service is starting. |
|
SERVICE_STOP_PENDING |
The service is stopping. |
|
SERVICE_RUNNING |
The service is running. |
|
SERVICE_CONTINUE_PENDING |
The service continue is pending. |
|
SERVICE_PAUSE_PENDING |
The service pause is pending. |
|
SERVICE_PAUSED |
The service is paused. |
|
Value |
Meaning |
|
SERVICE_ACCEPT_STOP | |
|
The service can be stopped. This enables the SERVICE_CONTROL_STOP value. | |
|
SERVICE_ACCEPT_PAUSE_CONTINUE | |
|
The service can be paused and continued. This enables the SERVICE_CONTROL_PAUSE and SERVICE_CONTROL_CONTINUE values. | |
|
SERVICE_ACCEPT_SHUTDOWN | |
|
The service is notified when system shutdown occurs. This enables the system to send a SERVICE_CONTROL_SHUTDOWN value to the service. The ControlService function cannot send this control code. |
ControlService, EnumDependentServices, EnumServicesStatus, QueryServiceStatus, SetServiceStatus