Determine the current execution state for a supported service.
DWORD SQLSCMGetLocalServiceState(LPSTR lpszSvc ,
LPDWORD pdwErr );
Nonzero on successful execution. Interpret a SQLSCMGetLocalServiceState successful execution return by using these values.
Return value | Service state |
---|---|
SERVICE_STOPPED | Stopped |
SERVICE_START_PENDING | Starting |
SERVICE_STOP_PENDING | Stopping |
SERVICE_RUNNING | Running |
SERVICE_CONTINUE_PENDING | Restarting after being paused |
SERVICE_PAUSE_PENDING | Pausing |
SERVICE_PAUSED | Paused |
SERVICE_UNKNOWN on unsuccessful execution. When SQLSCMGetServiceState returns SERVICE_UNKNOWN, the DWORD pointed to by pdwErr is filled.