Last modified: July 23, 2011
Applies to: Outlook
Registers a MAPIUID structure that uniquely represents the service provider.
The IMAPISupport::SetProviderUID method is implemented for address book and message store provider support objects. These providers call SetProviderUID to register a unique identifier described in the MAPIUID structure that is pointed to by lpProviderID. Providers include this identifier in all of the entry identifiers that they create.
MAPI uses the MAPIUID structure when it sends outbound messages to the MAPI spooler and to determine the appropriate provider for handling client requests. For example, when a client calls the IMAPISession::OpenEntry method, MAPI examines the MAPIUID portion of the entry identifier, maps it to the provider that passed it to SetProviderUID, and calls that provider's OpenEntry.
Call SetProviderUID at logon time to register your MAPIUID structure. MAPI allows address book and message store providers to register multiple identifiers. When you make multiple calls to SetProviderUID, it always adds the MAPIUID structure to the provider's set of MAPIUID structures, even if the MAPIUID is a duplicate. SetProviderUID cannot remove a MAPIUID.