SERVICE_FAILURE_ACTIONS_FLAG structure (winsvc.h)

Contains the failure actions flag setting of a service. This setting determines when failure actions are to be executed.

Syntax

typedef struct _SERVICE_FAILURE_ACTIONS_FLAG {
  BOOL fFailureActionsOnNonCrashFailures;
} SERVICE_FAILURE_ACTIONS_FLAG, *LPSERVICE_FAILURE_ACTIONS_FLAG;

Members

fFailureActionsOnNonCrashFailures

If this member is TRUE and the service has configured failure actions, the failure actions are queued if the service process terminates without reporting a status of SERVICE_STOPPED or if it enters the SERVICE_STOPPED state but the dwWin32ExitCode member of the SERVICE_STATUS structure is not ERROR_SUCCESS (0).

If this member is FALSE and the service has configured failure actions, the failure actions are queued only if the service terminates without reporting a status of SERVICE_STOPPED.

This setting is ignored unless the service has configured failure actions. For information on configuring failure actions, see ChangeServiceConfig2.

Remarks

The change takes effect the next time the system is started.

It can be useful to set this flag if your service has common failure paths where is it possible that the service could recover.

Requirements

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

See also

ChangeServiceConfig2

QueryServiceConfig2

SERVICE_FAILURE_ACTIONS