The MAPICrashRecovery function checks the state of the Personal Folders file (PST) or Offline Folders file (OST) shared memory. If the memory is in a consistent state, the MAPICrashRecovery function moves the data to disk and prevents further read or write access until the process is terminated.
- [in] Flags used to control how the MAPI crash recovery is performed. The following flags can be set:
- If the PSTs or OSTs are in a consistent state, move the data to disk and lock the PSTs or OSTs to prevent read or write access.
- Unlock the PSTs or OSTs for debugging. After a successful call to MAPICrashRecovery with the MAPICRASH_RECOVER flag, call MAPICrashRecovery with the MAPICRASH_CONTINUE flag to allow debugging to continue.
- If the PSTs or OSTs are in a consistent state, move the data to disk and lock the PSTs or OSTs to prevent read or write access. The PSTs or OSTs cannot be unlocked using MAPICRASH_CONTINUE. Must be used in combination with MAPICRASH_RECOVER.
The upper byte (0xFF000000) is reserved for provider specific crash recovery flags.
Call MAPICrashRecovery with the MAPICRASH_RECOVER and MAPICRASH_SYSTEM_SHUTDOWN flags in response to WM_ENDSESSION message.