IMsgServiceAdmin::SetPrimaryIdentity
The IMsgServiceAdmin::SetPrimaryIdentity
method designates a message service to be the supplier of the primary
identifier for the profile.
Quick Info
See IMsgServiceAdmin
: IUnknown
HRESULT SetPrimaryIdentity(
LPMAPIUID lpUID, |
|
ULONG ulFlags |
|
) |
|
Parameters
lpUID
[in] Pointer
to the MAPIUID
ulFlags
Reserved;
must be zero.
Return Values
S_OK
The message
service was successfully assigned the supplier of the primary identity.
MAPI_E_NO_ACCESS
SetPrimaryIdentity attempted to designate a message service that has the
SERVICE_NO_PRIMARY_IDENTITY flag set in its PR_RESOURCE_FLAGS
Remarks
The IMsgServiceAdmin::SetPrimaryIdentity
method establishes a message service as the supplier of the primary identity
for the profile. The primary identity is the typically the user logged on to
the message service. It is represented by three properties:
PR_IDENTITY_DISPLAY
PR_IDENTITY_ENTRYID
PR_IDENTITY_SEARCH_KEY
Every service
provider in the designated message service sets these three properties to the
display name, entry identifier, and search key of the messaging user that is
supplying the primary identity. Clients can retrieve the primary identity s
entry identifier by calling IMAPISession::QueryIdentity
Another
property, PR_RESOURCE_FLAGS
Each message
service provider that MAPI has information about can establish an identity for
each of its users when a client logs on to the service. However, because MAPI
supports connections to multiple service providers for each MAPI session, there
is no firm definition of a particular user s identity for the MAPI session as a
whole; a user s identity depends on which service is involved. Clients can call
SetPrimaryIdentity to designate one of the many identities established
for a user by message services as the primary identity for that user.
See Also