in SimpleRemoteConsole/ServiceInterop/Service.cs [394:425]
private void ReportSvcStatus(CurrentState state, int exitCode, uint waitHint)
{
if (svcStatus.dwCurrentState == (uint)CurrentState.SERVICE_STOPPED)
{
return;
}
serviceCheckPoint = 1;
svcStatus.dwCurrentState = (uint)state;
svcStatus.dwWin32ExitCode = exitCode;
svcStatus.dwWaitHint = waitHint;
if (state == CurrentState.SERVICE_START_PENDING)
{
svcStatus.dwControlsAccepted = 0;
}
else
{
svcStatus.dwControlsAccepted = (uint)ControlsAccepted.SERVICE_ACCEPT_STOP;
}
if (state == CurrentState.SERVICE_RUNNING || state == CurrentState.SERVICE_STOPPED)
{
svcStatus.dwCheckPoint = 0;
}
else
{
svcStatus.dwCheckPoint = serviceCheckPoint++;
}
NativeServiceWrapper.SetServiceStatus(hSvcStatus, ref svcStatus);
}