Share via


IMessengerService::ServiceID property

[ServiceID is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Retrieves the service ID of the contact associated with the selected service.

This property is read-only.

Syntax

HRESULT get_ServiceID(
  [out, retval] BSTR *pbstrID
);

Property value

Pointer to a BSTR that contains a string that identifies the service ID used by this contact.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
E_FAIL
General failure.
E_INVALIDARG
pbstrID is a NULL pointer.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80004005 General failure.

For a table of MSGR_E_* constants, see MSGRConstants.

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 btnServiceServiceID_Click()
    On Error Resume Next
    MsgBox("Service ID: " & MsgrService.ServiceID)
    ErrorTrap ("MsgrService.Name")  'Error handling routine
End Sub

Requirements

End of client support
Windows XP
End of server support
Windows Server 2003
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll

See also

IMessengerService

ServiceName