DMessengerEvents::OnContactListRemove Event
Deprecated. Indicates the result of an attempt to remove a contact from the Messenger object's Contact List.
Syntax
void OnContactListRemove( LONG hr, IDispatch *pMContact );
Parameters
hr
[in] Success or error code as a LONG.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. For a table of MSGR_E* constants, see MSGRConstants.
Possible values are as follows:
S_OK
A user was successfully removed from the Contact List.MSGR_E_USER_NOT_FOUND
The contact specified to be removed was not found in the Contact List.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 contacted, but was unavailable for unspecified reasons.pMContact
[in] Pointer to a IDispatch interface on the MessengerContact object that corresponds to the removed contact. Using this pointer, clients can now code to its IMessengerContact interface.
Return Value
No return value.
Event DISPID
DISPID_MUAE_ONLISTREMOVE
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 the IMessengerContacts::Remove method. If IMessengerContacts::Remove did not return S_OK, no notification is received. For example, attempting to remove a user without specifying a string for username is prevented by the IMessengerContacts::Remove method, which returns E_FAIL even before submission to the protocol and generates no event.
The Microsoft .NET Messenger Service always submits remove requests to the server and does not check local lists first. Other services may check local lists first and issue this event locally without submitting to the protocol for some of the error cases.
Removing a MessengerContact object from the Contact List does not release it from memory or otherwise deallocate it. Clients can deallocate the MessengerContact object as soon as it is removed from the Contact List or later after the client has shut down. A MessengerContact object that is not in the Contact List is still a valid object (for example, it could be used as the VARIANT argument in a IMessenger::InstantMessage call). After the object or contact is out of the Contact List, no status updates will be received from the server about this contact. As a result, when launching an instant message as described, the client will not be able to determine whether that contact is online until the message is sent.
This event is also issued whenever an attempt is made to remove a contact from the Contact List through user action in the user interface (UI) or through other internal method calls.
To be used when writing custom ::Invoke methods to handle these events.
Parameter vaArgs[x] Variant Type pMContact 0 VT_DISPATCH hr 1 VT_I4 Note This event is available for scripting languages.
Important DMessengerEvents::OnContactListRemove is no longer available in Windows Vista. See Windows Messenger for more information.