Share via


DMessengerEvents::OnMyFriendlyNameChange event

[OnMyFriendlyNameChange is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Indicates that the local client's friendly name has been changed or that a change was attempted.

Syntax

void OnMyFriendlyNameChange(
  [in] LONG hr,
  [in] BSTR bstrPrevFriendlyName
);

Parameters

hr [in]

Success or error code as LONG. S_OK is the only result returned currently.

bstrPrevFriendlyName [in]

A BSTR that contains the current client user's previous friendly name.

Return value

This event does not return a value.

Remarks

The Windows Messenger API does not have a method to put or set the client's friendly name information. This event fires only if the friendly name is changed through internal APIs or user action on the UI.

After receiving this event, the following call should be issued immediately to get the new friendly name of the current client user.

pOMessengerObject->get_FriendlyName

The previous friendly name might be permanently lost if it were not returned in the events. It can be used to check the client UI to be sure it is removed.

To be used when writing custom ::Invoke methods to handle these events.

Parameter vaArgs[x] Variant Type
bstrPrevFriendlyName 0 VT_BSTR
hr 1 VT_14

Note

This event is not 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
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll

See also

DMessengerEvents

FriendlyName

OnContactFriendlyNameChange