Share via


IMessengerService::Property property

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

Retrieves a specific property of the service.

This property is read/write.

Syntax

HRESULT put_Property(
  [in]          MSERVICEPROPERTY ePropType,
  [in]          VARIANT          vPropVal
);

HRESULT get_Property(
  [in]          MSERVICEPROPERTY ePropType,
  [out, retval] VARIANT          *pvPropVal
);

Property value

A pointer to a VARIANT that contains the property value. (Variant type differs depending on the property being set or retrieved.)

Error codes

Returns one of the following values.

Name Meaning
E_INVALIDARG
Returned in all cases. Reserved.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80070057 Returned in all cases. Reserved.

This method exists for later expansions of properties that can be associated with a contact but that will not require another iteration of the Messenger interfaces. For the current properties (CanPage, Phone, FriendlyName, and Blocked), each property has its own change event and method for accessing the property.

Note

This property is available for scripting languages but returns E_INVALIDARG.

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 btnServiceProperty_Click()
    On Error Resume Next
    FormPPType.Show vbModal 'Get user input
    If bDialogCancel = False Then
        MsgBox("Service Property type" & lppType & " = " & CStr(MsgrService.Property(MSERVICEPROP_INVALID_PROPERTY)))
    End If
    ErrorTrap ("MsgrService.Property")  '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