DMessengerEvents::OnContactListAdd Event
Deprecated. Indicates the result of an attempt to add to the Messenger object's Contact List.
Syntax
void OnContactListAdd( LONG hr, IDispatch *pMContact );
Parameters
hr
[in]Success or error code as a LONG. For a table of the MSGR_E_* constants, see MSGRConstants.
An error result for hr might result in all other event parameters being meaningless, NULL, or otherwise invalid. Always check for a successful hr before attempting to use the other event parameters.
S_OK
A contact was successfully added.MSGR_E_LIST_FULL
The server has determined that the Contact List is already at capacity. This is a server-determined limit.MSGR_E_ALREADY_IN_LIST
The server has determined that the user to be added is already in the Contact List.MSGR_E_USER_NOT_FOUND
The user specified to be added does not exist.MSGR_E_UNEXPECTED
The server has returned an unexpected error code.MSGR_E_SERVER_TOO_BUSY
The server is not processing requests or not accepting new connections.MSGR_E_SERVER_UNAVAILABLE
The server was able to be contacted, but was unavailable for unspecified reasons.E_INVALIDARG
An invalid value was passed into the pMContact parameter.pMContact
[in] Pointer to a IDispatch interface on the MessengerContact object where a change in block value was attempted.
Return Value
No return value.
Event DISPID
DISPID_MUAE_ONLISTADD
The DISPID for this event is defined in msgrua.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
Remarks
This event comes in response to a specific user action through the client user interface (UI). There is no API for adding a contact to the Contact List.
If you attempt to add a user who is already in a list, you will receive MSGR_E_ALREADY_IN_LIST in response. There is no initial check of client-side lists for the Microsoft .NET Messenger Service before submission as a protocol, although it is possible that other services might implement a client-side check that would issue an event locally in this situation and submit no protocol message for some of the error cases.
To be used when writing custom ::Invoke methods to handle these events.
Parameter vaArgs[x] Variant Type pMContact 0 VT_DISPATCH pMGroup 1 VT_DISPATCH hr 2 VT_I4 The same DISPID is defined on DMessengerPrivateEvents, and so the event also occurs on the MessengerPriv object.
Note This event is available for scripting languages.
Important DMessengerEvents::OnContactListAdd is no longer available in Windows Vista. See Windows Messenger for more information.
See Also