|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
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.
Converts a message store's internal entry identifier to an entry identifier more usable by the messaging system.
Client applications and service providers
A message store object retains an internal entry identifier which is meaningful only to service providers coresident with that message store. For other messaging components, MAPI supplies a wrapped version of the internal entry identifier that makes it recognizable as that belong to the message store. Coresident service providers should always be given the original unwrapped message store entry identifier; client applications should always be given the wrapped version, which is then usable anywhere in the messaging domain and in other domains.
A service provider can wrap a message store entry identifier using either the WrapStoreEntryID function or the IMAPISupport::WrapStoreEntryID method, which calls the WrapStoreEntryID function. The provider must wrap the entry identifier when exposing the message store's PR_ENTRYID (PidTagEntryId) property or writing it into a profile section, and when exposing the PR_STORE_ENTRYID (PidTagStoreEntryId) property. MAPI wraps a message store entry identifier when responding to an IMAPISession::OpenMsgStore call.
When a client application passes a wrapped message store entry identifier to MAPI, for example in an IMAPISession::OpenEntry call, MAPI unwraps the entry identifier before using it to call a provider method such as IMSProvider::Logon or IMSProvider::CompareStoreIDs.