Export (0) Print
Expand All

DMessengerEvents::OnContactFriendlyNameChange Event

[OnContactFriendlyNameChange is no longer available in 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]
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.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.

ParametervaArgs[x]Variant Type
bstrPrevFriendlyName0VT_BSTR
pMContact1VT_DISPATCH
hr2VT_I4

 

Note  This event is available for scripting languages only in a trusted zone.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP

Minimum supported server

Windows Server 2003

Product

Messenger 4.5

Header

Msgrua.h

IDL

Msgrua.idl

DLL

Msgsc.dll

See Also

DMessengerEvents
OnMyFriendlyNameChange

 

 

Send comments about this topic to Microsoft

Build date: 6/30/2010

Community Additions

ADD
Show:
© 2015 Microsoft