IMessengerServices::PrimaryService property

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

Returns the MessengerService object for the primary service for the primary client.

This property is read-only.

Syntax

HRESULT get_PrimaryService(
  [out, retval] IDispatch **ppService
);

Property value

Address of a pointer to a IMessengerService interface that represents the primary service.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
ppService is a NULL pointer.

Remarks

This property does not return any error codes.

The primary service is the service used when the AutoSignin method is called.

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 MsgrServices As MessengerAPI.IMessengerServices
Public MsgrService As MessengerAPI.IMessengerService

Private Sub btnServicesPrimaryService_Click()
    On Error Resume Next
    Set MsgrService = Nothing
    Set MsgrService = MsgrServices.PrimaryService
    MsgBox("Primary service : " & MsgrService.ServiceName)
    ErrorTrap ("MsgrServices.PrimaryService")   '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

IMessengerServices

Using the Registration Mechanism