[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.
void OnContactListAdd( [in] LONG hr, [in] IDispatch *pMContact );
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.
A contact was successfully added.
The server has determined that the Contact List is already at capacity. This is a server-determined limit.
The server has determined that the user to be added is already in the Contact List.
The user specified to be added does not exist.
The server has returned an unexpected error code.
The server is not processing requests or not accepting new connections.
The server was able to be contacted, but was unavailable for unspecified reasons.
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.
This event does not return a value.
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.
This event is available for scripting languages.
|Minimum supported client
||Windows 2000 Professional, Windows XP [desktop apps only]
|Minimum supported server
||Windows Server 2003 [desktop apps only]
|End of client support
|End of server support
||Windows Server 2003