Share via


DMsgrSessionManagerEvents::OnLockChallenge Event

Deprecated. Notifies a Messenger client that an authentication challenge from a Messenger service has been received.

Syntax

void OnLockChallenge(      
    long lCookie,
    BSTR bstrChallenge
);

Parameters

  • lCookie
    [in] LONG that has the same value that the Messenger client passes to the Messenger service as the lCookie parameter of the IMsgrLock::RequestChallenge method.
  • bstrChallenge
    [in] BSTR that is generated by the Messenger service to uniquely identify the challenge transaction.

Return Value

No return value.

Event DISPID

DISPID_ONLOCKCHALLENGE

The DISPID for this event is defined in mdispid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.

Remarks

The Messenger client application receives two parameters. The first parameter, lCookie, enables the Messenger client application to identify the challenge request to which the event corresponds. The value of lCookie is the same as that which is passed to the Messenger service when the application calls the IMsgrLock::RequestChallenge method. Therefore, it is important that a Messenger client application generates a different value for lCookie each time a challenge request is made to the Messenger service, and for each object that requires a Lock and Key authentication transaction.

The second parameter, bstrChallenge, is generated by the Messenger service. The key used by the Messenger client application is appended to this string and the result is encrypted with an RSA-MD5 Message Digest Algorithm (MD5). See Messenger Lock and Key API for more information. The MD5 encrypted string is passed back to the Messenger service as the bstrResponse of the IMsgrLock::SendResponse method when the Messenger client application responds to the Messenger service authentication challenge.

Important  DMsgrSessionManagerEvents::OnLockChallenge is no longer available in Windows Vista. See Windows Messenger for more information.

See Also

DMsgrSessionManagerEvents::OnLockEnable, DMsgrSessionManagerEvents::OnLockResult, IMsgrLock::RequestChallenge, IMsgrLock::SendResponse, Messenger Session Invite and Messenger Private APIs, Messenger Lock and Key API