Platform SDK: MAPI

Opening the Default Message Store

In any particular session, one message store acts as the default message store. A default message store has the following characteristics:

To retrieve the entry identifier for the default message store, you must call IMAPISession::GetMsgStoresTable to open the message store table and apply an appropriate restriction in a call to HrQueryAllRows. HrQueryAllRows will return a row set with the one row that represents the default message store. The restriction that you pass to HrQueryAllRows can take on one of the following forms:

  1. An AND restriction that uses an SAndRestriction structure to combine:
  2. A bitmask restriction that uses an SBitMaskRestriction structure for applying STATUS_DEFAULT_STORE as a mask against the PR_RESOURCE_FLAGS property.