Once you have a handle to a MAPI session, you can use it to find the public information store. Information stores are cataloged in the message store table, which can be searched using the IMAPISession::GetMsgStoresTable method.
Each information store is identified through its GUID (globally unique identifier). The Microsoft Exchange Server public information store has the PR_MDB_PROVIDER property set to pbExchangeProviderPublicGuid, which is defined in the EDKMDB.H file.
For more information on obtaining a session handle, see Opening an Information Store. For an example of using the HrOpenExchangePublicStore function in use, see the sample application source file \BKOFFICE\SAMPLES\EXCHANGE\SMBAGENT\SMBAGENT.C.