Partager via


IMAPISupport::SetProviderUID

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.

Registers a MAPIUID structure that uniquely represents the service provider.

HRESULT SetProviderUID(
LPMAPIUID lpProviderID,
ULONG ulFlags
);

Parameters

  • lpProviderID
    [in] A pointer to the MAPIUID structure that identifies the address book or message store provider.

  • ulFlags
    Reserved; must be zero.

Return Value

  • S_OK
    The MAPIUID structure was successfully registered.

Remarks

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.

Notes to Callers

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.

See Also

Reference

MAPIUID

IMAPISupport : IUnknown