Platform SDK: Exchange Server

HrServiceWaitForControl

The HrServiceWaitForControl function waits for service control after the service has been started.

Quick Info

Header file: WINWRAP.H
Library: WINWRAP.LIB

HRESULT HrServiceWaitForControl(
  DWORD dwTimeout,                
  EDK_SERVICE_CONTROL_T * pedksc  
);
 

Parameters

dwTimeout
Input parameter. The timeout interval, in milliseconds, to wait for service control before returning.
pedksc
Output parameter. Points to where one of the following service control values is returned:
EDK_SC_NONE
No change.
EDK_SC_PAUSE
Pause the service.
EDK_SC_CONTINUE
Continue the service.
EDK_SC_STOP
Stop the service.

Return Values

See Return Values.

Remarks

HrServiceWaitForControl can be used by any thread, after the service has started, to wait for one of the following service control values: EDK_SC_NONE, EDK_SC_PAUSE, EDK_SC_CONTINUE, or EDK_SC_STOP.

For more information on this function, see the HrServiceWaitForControl function in WINWRAP.C under the WINWRAP code sample in Code Samples folder.

For more information on the WINWRAP library, see Using WINWRAP Functions, Mandatory Entry Points and Variables, and Events Signalled.

See Also

fIsService, FServiceReportStatus, HrServiceConfirmStop, HrServiceGetArgv, HrServiceGetName, HrServiceProcessControl, HrServiceShutdown, HrServiceStartup, HrServiceWaitForContinue, HrServiceWaitForStop, HServiceCreateThread, ServiceMain, ServiceStop