The STATUS_DEFAULT_STORE flag is set in the PR_RESOURCE_FLAGS property.
MAPI automatically creates the IPM subtree and the root folders for search-results, common views and personal views when the message store is opened. For more information about these folders, see IPM Subtree and Special Folders.
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:
An AND restriction that uses an SAndRestriction structure to combine: