IMessengerService::ServiceName property
[ServiceName is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Retrieves the service name of the contact associated with this MessengerContact object.
This property is read-only.
Syntax
HRESULT get_ServiceName(
[out, retval] BSTR *pbstrServiceName
);
Property value
Pointer to a BSTR containing a string that identifies the service used by this contact.
Error codes
Returns one of the following values.
Name | Meaning |
---|---|
|
Success. |
|
pbstrServiceName is a NULL pointer. |
|
General failure. |
|
Internal string copy failed. |
Remarks
The following table lists error codes returned by this method.
Error Code | Meaning |
---|---|
0x80004005 | General internal failure. |
0x8007000E | Internal string copy failed. |
This method is useful for obtaining human-readable, service-identifying strings to be used in the UI.
Note
This property is available for scripting languages.
Examples
The following Visual Basic example shows the use of this method.
Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrService As MessengerAPI.IMessengerService
Private Sub btnServiceServiceName_Click()
On Error Resume Next
MsgBox("Service Name: " & MsgrService.ServiceName)
ErrorTrap ("MsgrService.Name") 'Error handling routine
End Sub
Requirements
End of client support |
Windows XP |
End of server support |
Windows Server 2003 |
Header |
|
IDL |
|
DLL |
|