IMessengerContacts::Count property
[Count is no longer available for use as of Windows Vista. See Windows Messenger for more information.]
Retrieves the number of MessengerContacts objects in the collection.
This property is read-only.
HRESULT get_Count(
[out, retval] long *pcContacts
);
LONG that provides the number of MessengerContacts objects in the collection.
Returns one of the following values.
Name | Meaning |
---|---|
|
Success. |
|
pcContacts is a NULL pointer. |
If there are no active MessengerContacts objects in the Contact List, pcContacts will return zero.
If this method is called while the client is offline, the method call will not fail, but the Contact List will always have zero members and zero count.
Note
This property is available for scripting languages.
The following Visual Basic example shows the use of this method.
Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrContacts As MessengerAPI.IMessengerContacts
Private Sub btnCount_Click()
On Error Resume Next
MsgBox("Contacts Count = " & CStr(MsgrContacts.Count))
ErrorTrap ("Contacts.Count") 'Error handling routine
End Sub
End of client support |
Windows XP |
End of server support |
Windows Server 2003 |
Header |
|
IDL |
|
DLL |
|