Published: July 16, 2012
Opens a container, messaging user, or distribution list, and returns a pointer to an interface implementation to provide further access.
Before MAPI calls your OpenEntry method, it determines that the entry identifier in the lpEntryID parameter belongs to you and not to another provider. MAPI does this by matching the MAPIUID structure in the entry identifier with the MAPIUID that you registered by calling the IMAPISupport::SetProviderUID method at startup.
Open the object as read-only, unless the MAPI_MODIFY or MAPI_BEST_ACCESS flag is set in the ulFlags parameter. If you do not allow modification for the requested object, do not open the object at all and return MAPI_E_NO_ACCESS.
If MAPI passes NULL for lpEntryID, open the root container in your container hierarchy.
The object that you are being asked to open might be an object copied from another provider. In this case, it will support the PR_TEMPLATEID (PidTagTemplateid) property. If the object does support this property, call the IMAPISupport::OpenTemplateID method to bind to code for this entry in the foreign provider, passing PR_TEMPLATEID in the lpTemplateID parameter and 0 in the ulTemplateFlags parameter. IMAPISupport::OpenTemplateID passes this information to the foreign provider in a call to the foreign provider's IABLogon::OpenTemplateID method. If IMAPISupport::OpenTemplateID raises an error, usually because the foreign provider is unavailable or not included in the profile, try to continue by treating the unbound entry as read-only. For more information about opening foreign address book entries, see Acting as a Host Address Book Provider.