Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Outlook 2013 | Outlook 2016
Service providers can use the IMAPISupport::OpenEntry and IMAPISupport::CompareEntryIDs methods to open and compare objects that belong to their provider or to other providers:
Like IMAPISession::OpenEntry for clients, providers can use their support object's OpenEntry method to access any object as long they know the object's entry identifier. Unlike the session method, the support method requires that you specify a valid entry identifier in the lpEntryID parameter. It cannot be NULL.
To illustrate how a transport provider might use IMAPISupport::OpenEntry, consider the following scenario. The transport provider has received a message formatted in Rich Text Format and does not know whether the target recipient can handle this format. Before delivering the message, the transport provider needs to do the following:
Call the message's IMessage::GetRecipientTable method to access the recipient table and the recipient's entry identifier, its PR_ENTRYID (PidTagEntryId) property.
Pass the entry identifier to IMAPISupport::OpenEntry to open the recipient, typically either a messaging user or distribution list. The lpInterface parameter should be set to NULL because the provider cannot know ahead of time the object type of the recipient. The support object's OpenEntry method calls IMAPISession::OpenEntry to determine the address book provider responsible for the recipient. The session object then calls the appropriate address book provider's OpenEntry method to open the recipient and return an interface pointer to the transport provider.
Call the recipient's IMAPIProp::GetProps method to retrieve its PR_SEND_RICH_INFO (PidTagSendRichInfo) property. If PR_SEND_RICH_INFO is set to TRUE, the recipient can handle formatted text.
If you have opened several objects from other providers, you may need to find out whether two entry identifiers refer to the same object. For example, you may have a short-term entry identifier and a long-term entry identifier and these identifiers may or may not identify the same object. To avoid redundant processing, call the IMAPISupport::CompareEntryIDs method to compare these entry identifiers. You must use this method for entry identifier comparison because entry identifiers cannot be compared directly.