SERVICE_FAILURE_ACTIONS (advapi32)
Last changed: SeanM-76.164.8.130

.
Summary
Represents the action the service controller should take on each failure of a service. A service is considered failed when it terminates without reporting a status of SERVICE_STOPPED to the service controller.

C# Signature:

    [StructLayout(LayoutKind.Sequential)]
    public struct SERVICE_FAILURE_ACTIONS
    {
        public int dwResetPeriod;
        [MarshalAs(UnmanagedType.LPTStr)]
        public string lpRebootMsg;
        [MarshalAs(UnmanagedType.LPTStr)]
        public string lpCommand;
        public int cActions;
        public IntPtr lpsaActions;
    }

VB Signature:

Declare Function SERVICE_FAILURE_ACTIONS Lib "advapi32.dll" (TODO) As TODO

User-Defined Types:

Use marshalled SC_ACTION structures for lpsaActions.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

See ChangeServiceConfig2 for sample code.

Documentation