This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Establishes a message store as the default message store for the session.
[in] A bitmask of flags that controls the setting of the default message store. These flags are mutually exclusive; only one of the following flags can be set:
Establishes the message store as the session default. Updates the message store's status table row by setting the STATUS_DEFAULT_STORE flag in the PR_RESOURCE_FLAGS (PidTagResourceFlags) column.
Establishes the message store as the store to be used at logon. If the message store is not the default store, clients should make it the default. Updates the message store's status table row by setting the STATUS_PRIMARY_STORE flag in the PR_RESOURCE_FLAGS column.
Establishes the message store as the store to be used at logon if the primary message store is not available. If a client cannot open the primary store, it should open the secondary store and set it as the default. Updates the message store's status table row by setting the STATUS_SECONDARY_STORE flag in the PR_RESOURCE_FLAGS column.
Sets the STATUS_SIMPLE_STORE flag in the message store's PR_RESOURCE_FLAGS property in its status table row, message store table row, and in the session profile.
Sets the STATUS_SIMPLE_STORE flag in the message store's PR_RESOURCE_FLAGS property in its status table row and message store table row. The profile is not modified.
[in] The byte count in the entry identifier pointed to by the lpEntryID parameter.
[in] A pointer to the entry identifier of the message store that is intended as the default. If a client passes NULL in lpEntryID, no message store is selected as the default.
You can determine the default message store for the session by retrieving the status table and searching for the setting of the STATUS_DEFAULT_STORE flag in the PR_RESOURCE_FLAGS column. The row that has this setting represents the message store that is designated as the session default.
When either the MAPI_DEFAULT_STORE or the MAPI_SIMPLE_STORE_PERMANENT flag is set, MAPI updates the profile, message store table, and status table.
Whenever a change is made to the message store default setting, the following notifications are generated:
An fnevTableModified event notification is issued for each affected row in both the message store and status table.
An internal notification is issued to the MAPI spooler. Operations already in progress are completed without change; new operations that involve the default message store, such as message downloading, are processed for the new default store.