title: Accessing Exchange account message store
body: <p>I am trying to access the message store of an Exchange account.
   I am using MAPI. The IMsgStore object is initialized using IMAPISession::OpenMsgStore.
  The problem is that when using Exchange Cached Mode, the root folder for the 'Inbox' and Sent' is <strong>IPM_SUBTREE</strong>, while for online mesage store it is <strong>Top of Information Store</strong>.
  How can I tell if the message store is located online or it is a local file path ?
  I would like to be able to tell that from IMsgStore.</p>
  
  <p>And another thing, do I have to supply the MDB_ONLINE to the IMAPISession::OpenMsgStore call if the message store is online?</p>
  
  <p>This is how it looks now:</p>
  
  <pre><code>    hRes = lpSession-&gt;OpenMsgStore( NULL,
                                      storeEntryID.cb,
                                      (LPENTRYID) storeEntryID.lpb,
                                      &amp;IID_IMsgStore,
                                      /*MDB_ONLINE | */MDB_WRITE,
                                      (LPMDB *)&amp;msgStore);
  </code></pre>
  
  <p>Outlook 2010</p>