C# Class Microsoft.WindowsAPICodePack.ApplicationServices.ApplicationRestartRecoveryManager

Provides access to the Application Restart and Recovery features available in Windows Vista or higher. Application Restart and Recovery lets an application do some recovery work to save data before the process exits.
Datei anzeigen Open project: godly-devotion/Baka-MPlayer-old

Public Methods

Method Description
ApplicationRecoveryFinished ( bool success ) : void

Called by an application's RecoveryCallback method to indicate that the recovery work is complete.

This should be the last call made by the RecoveryCallback method because Windows Error Reporting will terminate the application after this method is invoked.

ApplicationRecoveryInProgress ( ) : bool

Called by an application's RecoveryCallback method to indicate that it is still performing recovery work.

RegisterForApplicationRecovery ( Microsoft.WindowsAPICodePack.ApplicationServices.RecoverySettings settings ) : void

Registers an application for recovery by Application Restart and Recovery.

The time interval is the period of time within which the recovery callback method calls the ApplicationRecoveryInProgress method to indicate that it is still performing recovery work.

RegisterForApplicationRestart ( Microsoft.WindowsAPICodePack.ApplicationServices.RestartSettings settings ) : void

Registers an application for automatic restart if the application is terminated by Windows Error Reporting.

A registered application will not be restarted if it executed for less than 60 seconds before terminating.

UnregisterApplicationRecovery ( ) : void

Removes an application's recovery registration.

UnregisterApplicationRestart ( ) : void

Removes an application's restart registration.

Method Details

ApplicationRecoveryFinished() public static method

Called by an application's RecoveryCallback method to indicate that the recovery work is complete.
This should be the last call made by the RecoveryCallback method because Windows Error Reporting will terminate the application after this method is invoked.
public static ApplicationRecoveryFinished ( bool success ) : void
success bool true to indicate the the program was able to complete its recovery /// work before terminating; otherwise false.
return void

ApplicationRecoveryInProgress() public static method

Called by an application's RecoveryCallback method to indicate that it is still performing recovery work.
/// This method must be called from a registered callback method.
public static ApplicationRecoveryInProgress ( ) : bool
return bool

RegisterForApplicationRecovery() public static method

Registers an application for recovery by Application Restart and Recovery.
The time interval is the period of time within which the recovery callback method calls the ApplicationRecoveryInProgress method to indicate that it is still performing recovery work.
/// The registration failed due to an invalid parameter. /// /// The registration failed.
public static RegisterForApplicationRecovery ( Microsoft.WindowsAPICodePack.ApplicationServices.RecoverySettings settings ) : void
settings Microsoft.WindowsAPICodePack.ApplicationServices.RecoverySettings An object that specifies /// the callback method, an optional parameter to pass to the callback /// method and a time interval.
return void

RegisterForApplicationRestart() public static method

Registers an application for automatic restart if the application is terminated by Windows Error Reporting.
A registered application will not be restarted if it executed for less than 60 seconds before terminating.
Registration failed due to an invalid parameter. The attempt to register failed.
public static RegisterForApplicationRestart ( Microsoft.WindowsAPICodePack.ApplicationServices.RestartSettings settings ) : void
settings Microsoft.WindowsAPICodePack.ApplicationServices.RestartSettings An object that specifies /// the command line arguments used to restart the /// application, and /// the conditions under which the application should not be /// restarted.
return void

UnregisterApplicationRecovery() public static method

Removes an application's recovery registration.
/// The attempt to unregister for recovery failed.
public static UnregisterApplicationRecovery ( ) : void
return void

UnregisterApplicationRestart() public static method

Removes an application's restart registration.
/// The attempt to unregister for restart failed.
public static UnregisterApplicationRestart ( ) : void
return void