CWinApp::ApplicationRecoveryCallback

Called by the framework when the application unexpectedly exits.

virtual DWORD ApplicationRecoveryCallback(
   LPVOID lpvParam
);

Parameters

  • [in] lpvParam
    Reserved for future use.

Return Value

0 if this method is successful; nonzero if an error occurs.

Remarks

If your application supports the restart manager, the framework calls this function when your application unexpectedly exits.

The default implementation of ApplicationRecoveryCallback uses the CDataRecoveryHandler to save the list of currently open documents to the registry. This method does not autosave any files.

To customize the behavior, override this function in a derived CWinApp Class or pass your own application recovery method as a parameter to CWinApp::RegisterWithRestartManager.

Requirements

Header: afxwin.h

See Also

Reference

CWinApp Class

Hierarchy Chart

CWinApp::RegisterWithRestartManager

CDataRecoveryHandler Class