The IMAPISupport::SetProviderUID method registers a MAPIUID structure that uniquely represents the service provider.
HRESULT SetProviderUID(
LPMAPIUID lpProviderID,
ULONG ulFlags
);
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 pointed to by lpProviderID. Providers include this identifier in all of the entry identifiers that they create.
MAPI uses the MAPIUID when sending outbound messages to the MAPI spooler and to determine the appropriate provider for handling client requests. For example, when a client calls IMAPISession::OpenEntry, 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 MAPIUIDs, even if the MAPIUID is a duplicate. SetProviderUID cannot remove a MAPIUID.