DMessengerEvents::OnMyFriendlyNameChange Event

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

Syntax

void OnMyFriendlyNameChange(      
    LONG hr,
    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

No return value.

Event DISPID

DISPID_MUAE_ONMYFRIENDLYNAMECHANGE

The DISPID for this event is defined in msgrua.h. Use this value to identify the event handler when implementing IDispatch::Invoke.

Remarks

The Microsoft 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 user interface (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.

Important  DMessengerEvents::OnMyFriendlyNameChange is no longer available in Windows Vista. See Windows Messenger for more information.

See Also

IMessengerContact::FriendlyName, DMessengerEvents::OnContactFriendlyNameChange