Platform SDK: DLLs, Processes, and Threads

SC_ACTION

The SC_ACTION structure represents an action that the service control manager can perform.

typedef struct _SC_ACTION {
  SC_ACTION_TYPE  Type;
  DWORD           Delay;
} SC_ACTION, *LPSC_ACTION;

Members

Type
Specifies the action to be performed. This member can be one of the following values.
Value Meaning
SC_ACTION_NONE No action.
SC_ACTION_REBOOT Reboot the computer.
SC_ACTION_RESTART Restart the service.
SC_ACTION_RUN_COMMAND Run a command.

Delay
Specifies the time to wait before performing the specified action, in milliseconds.

Remarks

This structure is used by the ChangeServiceConfig2 and QueryServiceConfig2 functions, in the SERVICE_FAILURE_ACTIONS structure.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Winsvc.h; include Windows.h.

See Also

Services Overview, Service Structures, ChangeServiceConfig2, QueryServiceConfig2, SERVICE_FAILURE_ACTIONS