Share via


IMessenger::MyFriendlyName property

[IMessenger::MyFriendlyName is no longer available for use as of Windows Vista. For more information, see Windows Messenger.]

Retrieves the friendly (display) name of the local client user. Use MyFriendlyName instead. To return a list of MessengerService objects, use the Services property.

This property is read-only.

Syntax

HRESULT get_MyFriendlyName(
  [out, retval] BSTR *pbstrName
);

Property value

Return value. Pointer to a BSTR that contains the current user's friendly name.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
pbstrName is a NULL pointer.
E_OUTOFMEMORY
String comparison failed.
E_FAIL
Local user is disconnected.

Remarks

If the local client is offline when MyFriendlyName is called, the call will succeed and pbstrName will contain an empty string.

Even when online, this method does not recheck the user store for the current user's friendly name. The value returned will always be the value sent through the protocol upon the initial primary service sign-in.

Note

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

Requirements

Minimum supported client
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
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll

See also

IMessenger

MyFriendlyName