IMessengerServices::Count Property

[Count is no longer available in Windows Vista. See Windows Messenger for more information.]

Retrieves the number of MessengerServices objects in the collection.

This property is read-only.

Syntax (get)

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

Parameters

pcServices [out]

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

Return Value

Returns one of the following values. 

Return codeDescription
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

Header

Msgrua.h

IDL

Msgrua.idl

DLL

Msgsc.dll

See Also

IMessengerServices
Item

 

 

Send comments about this topic to Microsoft

Build date: 6/30/2010

Show: