# ServiceStatusConstants
{: .no_toc }

The runtime-state values a service reports to the SCM through [**ServiceManager.ReportStatus**](/tB/Packages/WinServicesLib/ServiceManager.md#reportstatus). The same numeric values are returned by [**ServiceState.CurrentState**](/tB/Packages/WinServicesLib/ServiceState.md#currentstate) (typed as a plain **Long**) and rendered as text by [**ServiceState.CurrentStateText**](/tB/Packages/WinServicesLib/ServiceState.md#currentstatetext).

The values mirror the Win32 `SERVICE_*` state constants. The `vb` prefix is a historical hold-over from VB6's coding conventions.

| Constant | Value | Description |
|----------|-------|-------------|
| **vbServiceStatusStopped**{: #vbServiceStatusStopped }                   | 1 | The service is not running. Set by the service immediately before [**EntryPoint**](/tB/Packages/WinServicesLib/ITbService.md#entrypoint) returns; also the initial state the SCM stores when the service is registered. |
| **vbServiceStatusStartPending**{: #vbServiceStatusStartPending }         | 2 | The service is starting up. Set by the package's dispatcher trampoline before it calls [**EntryPoint**](/tB/Packages/WinServicesLib/ITbService.md#entrypoint); services with long start-up sequences should also re-report this state periodically together with a `WaitHint` so the SCM does not declare the service hung. |
| **vbServiceStatusStopPending**{: #vbServiceStatusStopPending }           | 3 | The service has acknowledged a stop request and is shutting down. Typically reported from [**ChangeState**](/tB/Packages/WinServicesLib/ITbService.md#changestate) immediately on receipt of [**vbServiceControlStop**](/tB/Packages/WinServicesLib/Enumerations/ServiceControlCodeConstants.md#vbServiceControlStop). |
| **vbServiceStatusRunning**{: #vbServiceStatusRunning }                   | 4 | The service has reached steady state. Reported from [**EntryPoint**](/tB/Packages/WinServicesLib/ITbService.md#entrypoint) once initialisation is complete; this is what `services.msc` shows as "Running". |
| **vbServiceStatusContinuePending**{: #vbServiceStatusContinuePending }   | 5 | The service has acknowledged a continue request and is resuming. Reported from [**ChangeState**](/tB/Packages/WinServicesLib/ITbService.md#changestate) on [**vbServiceControlContinue**](/tB/Packages/WinServicesLib/Enumerations/ServiceControlCodeConstants.md#vbServiceControlContinue). |
| **vbServiceStatusPausePending**{: #vbServiceStatusPausePending }         | 6 | The service has acknowledged a pause request. Reported from [**ChangeState**](/tB/Packages/WinServicesLib/ITbService.md#changestate) on [**vbServiceControlPause**](/tB/Packages/WinServicesLib/Enumerations/ServiceControlCodeConstants.md#vbServiceControlPause). |
| **vbServiceStatusPaused**{: #vbServiceStatusPaused }                     | 7 | The service has reached the paused state. Reported from [**EntryPoint**](/tB/Packages/WinServicesLib/ITbService.md#entrypoint) once the pause loop is active. |

The typical state sequence for a simple service: [**vbServiceStatusStartPending**](#vbServiceStatusStartPending) (package) → [**vbServiceStatusRunning**](#vbServiceStatusRunning) (from [**EntryPoint**](/tB/Packages/WinServicesLib/ITbService.md#entrypoint)) → [**vbServiceStatusStopPending**](#vbServiceStatusStopPending) (from [**ChangeState**](/tB/Packages/WinServicesLib/ITbService.md#changestate)) → [**vbServiceStatusStopped**](#vbServiceStatusStopped) (from [**EntryPoint**](/tB/Packages/WinServicesLib/ITbService.md#entrypoint), before returning).
