Determining the Type of Information Store

In some cases, your application may not know if a store is a Microsoft Exchange Server public information store or private information store, even though it has already obtained a pointer to it. To determine the type of information store, check the value of the store’s PR_MDB_PROVIDER property. This procedure is performed within the FIsPublicStore function.

    To determine the type of information store
  1. Open the information store as described in Opening an Information Store. The call to the IMAPISession::OpenMsgStore method creates the information store object and returns an LPMDB pointer to it.
  2. Call the FIsPublicStore function, passing the LPMDB pointer to the information store. This function checks the information store’s PR_MDB_PROVIDER property. If the value of this property is pbExchangeProviderPublicGuid, the store is a public information store and the function sets its output parameter lpIsPublicStore to TRUE. Other values for this property correspond to other types of information stores; for more information, see the following section.

Identifying Providers by Provider GUIDs

Microsoft Exchange Server defines several GUIDs in the EDKMDB.H file. The MAPI PR_MDB_PROVIDER property can have these values in the store table and when returned from a call to the IMAPIProp::GetProps method on the information store, on a folder, or on message objects. The value returned identifies the type of information store provider.

GUID Information Store Provider
pbExchangeProviderPrimaryUserGuid Private information store. Calling application is the owner
pbExchangeProviderDelegateGuid Private information store. Calling application has delegate access
pbExchangeProviderPublicGuid Microsoft Exchange Server public information store

Another GUID is also used to recognize the Microsoft Exchange Server transport provider in the transports table.

GUID Type of Provider
pbExchangeProviderXportGuid Microsoft Exchange Server transport provider

If a provider GUID does not match any of the entries in the preceding tables, it is not a provider specific to Microsoft Exchange Server.