IMessengerService::MyFriendlyName property
[MyFriendlyName is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Retrieves the local user's friendly name that corresponds to the selected service.
This property is read-only.
Syntax
HRESULT get_MyFriendlyName(
[out, retval] BSTR *pbstrName
);
Property value
Pointer to a BSTR containing the friendly name for the local user of this service.
Error codes
Returns one of the following values.
Name | Meaning |
---|---|
|
Success. |
|
pbstrName is a NULL pointer. |
|
pbstrName returned a NULL string. |
|
String comparison failed. |
|
This service is offline. |
Remarks
The following table lists error codes returned by this method.
Error Code | Meaning |
---|---|
0x80004005 | pbstrName returned a NULL string. |
0x8007000E | String comparison failed. |
MSGR_E_NOT_LOGGED_ON | The local user is not logged in to the selected service. |
For a table of MSGR_E_* constants, see MSGRConstants.
Note
This property is not available for scripting languages.
Examples
The following Visual Basic example shows the use of this method.
Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrServices As MessengerAPI.IMessengerServices
Private Sub btnServicesCount_Click()
On Error Resume Next
MsgBox("Services Count= " & CStr(MsgrServices.Count))
ErrorTrap ("MsgrServices.Count") 'Error handling routine
End Sub
Requirements
End of client support |
Windows XP |
End of server support |
Windows Server 2003 |
Header |
|
IDL |
|
DLL |
|