How to: Access a Store on the Remote Server When Outlook is in Cached Exchange Mode
|How to: Access a Store on the Remote Server When Outlook is in Cached Exchange Mode|
This topic contains a code sample in C++ that shows how to use the MAPI_NO_CACHE flag to open a folder or a message on a message store on the remote server when Microsoft Office Outlook is in Cached Exchange Mode.
Cached Exchange Mode permits Outlook to use a local copy of a user's mailbox while Outlook maintains an online connection to a remote copy of the user's mailbox on the remote Exchange server. When Outlook is running in Cached Exchange Mode, by default, any MAPI solutions that log on to the same session are also connected to the cached message store. Any data that is accessed and any changes that are made are made against the local copy of the mailbox.
A client or service provider can override the connection to the local message store and open a message or a folder on the remote store by setting the bit for MAPI_NO_CACHE in the ulFlags parameter when calling IMsgStore::OpenEntry.
The following code sample shows how to call IMsgStore::OpenEntry with the MAPI_NO_CACHE flag set in the ulFlags parameter to open the root folder on the remote message store.
If you opened the message store with the MDB_ONLINE flag on the remote server, you do not have to use the MAPI_NO_CACHE flag.