Beispiel #1
0
        private static UInt32 InternalRecoveryHandler(IntPtr parameter)
        {
            bool cancelled = false;

            ApplicationRecoveryInProgress(out cancelled);

            GCHandle     handle = GCHandle.FromIntPtr(parameter);
            RecoveryData data   = handle.Target as RecoveryData;

            data.Invoke();
            handle.Free();

            return(0);
        }
 /// <summary>
 /// Initializes a new instance of the <b>RecoverySettings</b> class.
 /// </summary>
 /// <param name="data">A recovery data object that contains the callback method (invoked by the system
 /// before Windows Error Reporting terminates the application) and an optional state object.</param>
 /// <param name="interval">The time interval within which the
 /// callback method must invoke <see cref="ApplicationRestartRecoveryManager.ApplicationRecoveryInProgress"/> to
 /// prevent WER from terminating the application.</param>
 /// <seealso cref="ApplicationRestartRecoveryManager"/>
 public RecoverySettings(RecoveryData data, uint interval)
 {
     this.recoveryData = data;
     this.pingInterval = interval;
 }