Share via


IMessengerConversationWnd::Contacts property

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

Retrieves a read-only collection of contacts in the conversation window.

This property is read-only.

Syntax

HRESULT get_Contacts(
  [out, retval] IDispatch **pContacts
);

Property value

Address of a pointer to an IDispatch interface on a MessengerContacts object that contains the participants of that conversation, excluding the local user.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
pContacts is a NULL pointer.
E_FAIL
Client was not signed in to the primary service at the time this method was called.
S_FALSE
Could not bring focus to the window.
E_OUTOFMEMORY
Error during list creation.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80004005 Client was not signed in to the primary service at the time this method was called.
0x8007000E Error during list creation.

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 mWindow2 As MessengerAPI.IMessengerConversationWnd 
Public MsgrContacts As MessengerAPI.IMessengerContacts 

Private Sub btnWindow2Contacts_Click() 
    On Error Resume Next 
    Set MsgrContacts = Nothing 
    Dim strContactName_0 as String 
    'Launch a Conversation window with an online contact 
    '(where strContactName_0 is the online contact's signinname) 
    Set mWindow2 = MsgrUIA.InstantMessage (strContactName_0) 
    Set MsgrContacts = mWindow2.Contacts 
    ErrorTrap ("IMessengerConversationWnd.Contacts") '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

IMessengerConversationWnd