DMessengerEvents::OnContactListAdd event
[OnContactListAdd is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Indicates the result of an attempt to add to the Messenger object's Contact List.
Syntax
void OnContactListAdd(
[in] LONG hr,
[in] 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.
Value Meaning - 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\]
-
C++ Pointer to a IDispatch interface on the MessengerContact object where a change in block value was attempted. VB A MessengerContact object where a change in block values was attempted.
Return value
This event does not return a value.
Remarks
This event comes in response to a specific user action through the client 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.
Requirements
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
End of client support |
Windows XP |
End of server support |
Windows Server 2003 |
Product |
Messenger 4.5 |
Header |
|
IDL |
|
DLL |
|