AcceptControls Method

The AcceptControls method sets events that have to be processed by service.  

void AcceptControls(
 LONG dwFlags,
 BOOL fAccept
);


Parameters
  dwFlags     [in]. Control codes the service accepts and processes in its handler function. The following are the control codes.

Control codeMeaning
RSA_SERVICE_ACCEPT_PARAMCHANGEWindows 2000/XP: The service can reread its startup parameters without being stopped and restarted. This control code allows the service to receive OnParamChange notifications.
RSA_SERVICE_ACCEPT_PAUSE_CONTINUEThe service can be paused and continued. This control code allows the service to receive OnServicePause notifications.
RSA_SERVICE_ACCEPT_SHUTDOWNThe service is notified when system shutdown occurs. This control code allows the service to receive OnServiceStop
RSA_SERVICE_ACCEPT_STOPThe service can be stopped. This control code allows the service to receive OnServiceStop

  fAccept     [in]. If fAccept has TRUE value then control codes are accepted. Alternatively, if fAccept is FALSE control codes are dropped.