DMessengerPrivateEvents::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 as the one 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 msgrpriv.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 the challenge string and the result is encrypted with an RSA-MD5 Message Digest Algorithm (MD5). For more information, see Messenger Lock and Key API. The MD5 hashed string is used as the bstrResponse of the IMsgrLock::SendResponse method when the Messenger client application responds to the Messenger service authentication challenge.

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

See Also

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