DMessengerEvents::OnContactFriendlyNameChange event
[OnContactFriendlyNameChange is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Indicates that a contact in the client's Contact List has changed the friendly name.
Syntax
void OnContactFriendlyNameChange(
[in] LONG hr,
[in] IDispatch *pMContact,
[in] BSTR bstrPrevFriendlyName
);
Parameters
-
hr [in]
-
Success or error code as a LONG.
An error result for hr may 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.
- *pMContact* \[in\]
-
C++ Pointer to a IDispatch interface on the MessengerContact object that corresponds to a contact whose friendly name has changed. Using this pointer, clients can now code to its IMessengerContact interface. VB A MessengerContact object corresponding to a contact whose friendly name has changed. -
bstrPrevFriendlyName [in]
-
A BSTR that contains the user's previous friendly name.
Return value
This event does not return a value.
Remarks
After receiving this event, the following call should be issued immediately to get the new friendly name of the pMContact object pointer or contact sent by the event.
pMContact->get_FriendlyName
The previous friendly name would be permanently lost if it were not returned in the events. It can be used to qualify the code that might traverse a list or UI in a client to make sure that the old friendly name has been removed.
The friendly name is set by the client that corresponds to the remote contact. If the friendly name was changed while the local client was offline, the event is issued upon sign-in.
To be used when writing custom ::Invoke methods to handle these events.
Parameter | vaArgs[x] | Variant Type |
---|---|---|
bstrPrevFriendlyName | 0 | VT_BSTR |
pMContact | 1 | VT_DISPATCH |
hr | 2 | VT_I4 |
Note
This event is available for scripting languages only in a trusted zone.
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 |
|