Share via


IMessengerServices::Count property

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

Retrieves the number of MessengerServices objects in the collection.

This property is read-only.

Syntax

HRESULT get_Count(
  [out, retval] LONG *pcServices
);

Property value

Pointer to a LONG that provides the number of MessengerServices objects in the collection.

Error codes

Returns one of the following values.

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

Remarks

This property does not return any error codes.

If there are no active MessengerServices objects, pcServices will return zero.

If this method is called while the client is offline, the method call will not fail.

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

Private Sub btnServicesCount_Click()
    On Error Resume Next
    MsgBox("Services Count= " & CStr(MsgrServices.Count))
    ErrorTrap ("MsgrServices.Count")    '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

Item