SC_ACTION structure (winsvc.h)

Represents an action that the service control manager can perform.

Syntax

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

Members

Type

The action to be performed. This member can be one of the following values from the SC_ACTION_TYPE enumeration type.

Value Meaning
SC_ACTION_NONE
0
No action.
SC_ACTION_REBOOT
2
Reboot the computer.
SC_ACTION_RESTART
1
Restart the service.
SC_ACTION_RUN_COMMAND
3
Run a command.

Delay

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

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header winsvc.h (include Windows.h)

See also

ChangeServiceConfig2

QueryServiceConfig2

SERVICE_FAILURE_ACTIONS