|
Class ServiceStatus
public final class ServiceStatus implements Cloneable
{
// Fields
public int CheckPoint;
public int ControlsAccepted;
public int CurrentState;
public int ServiceSpecificExitCode;
public int WaitHint;
public int Win32ExitCode;
}
This class contains information about the state of a service. For more information about this class, see the Microsoft® Win32® SERVICE_STATUS documentation.
- CheckPoint
- A value that the service increments periodically to report its progress during a lengthy start, stop, or continue operation. For example, the service should increment this value as it completes each step of its initialization when it is starting up. The user interface program that invoked the operation on the service uses this value to track the progress of the service during a lengthy operation. This value is not valid and should be zero when the service does not have a start, stop, or continue operation pending.
- ControlsAccepted
- The control codes that the service will accept and process. This can be a combination of ACCEPT_STOP, ACCEPT_PAUSE_CONTINUE, or ACCEPT_SHUTDOWN.
- CurrentState
- The current state of the service. This can be one of the following values:
- ServiceSpecificExitCode
- A service-specific error code that the service returns when an error occurs while the service is starting or stopping. This value is ignored unless the Win32ExitCode field is set to ERROR_SERVICE_SPECIFIC_ERROR.
- WaitHint
- An estimate of the amount of time, in milliseconds, that the service expects a pending start, stop, or continue operation to take before the service makes its next call to the Service.setServiceStatus method with either an incremented CheckPoint value or a change in CurrentState. If the amount of time specified by WaitHint passes, and CheckPoint has not been incremented or CurrentState has not changed, the service control manager or service control program can assume that an error has occurred.
- Win32ExitCode
- A Win32 error code that the service uses to report an error that occurs when it is starting or stopping. To return an error code specific to the service, the service must set this value to ERROR_SERVICE_SPECIFIC_ERROR to indicate that the ServiceSpecificExitCode field contains the error code. The service should set this value to NO_ERROR when it is running and on normal termination.
|