IMessenger::MyFriendlyName Property

Deprecated. Deprecated in Microsoft Windows Messenger 5.0. Retrieves the friendly (display) name of the local client user.

Syntax

HRESULT IMessenger::get_MyFriendlyName(BSTR *pbstrName);

Parameters

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

Return Value

Returns one of the following values.

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

Important   The IMessenger::MyFriendlyName property is available for use in Windows Messenger 5.0. It may be unavailable in subsequent versions. Use IMessengerService::MyFriendlyName instead. To return a list of MessengerService objects, use the IMessenger::Services property.

If the local client is offline when IMessenger::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.

Important  IMessenger::MyFriendlyName is no longer available in Windows Vista. See Windows Messenger for more information.

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

See Also

IMessengerService::MyFriendlyName