Returns an enumerator with which the IMessengerService objects in a collection can be enumerated. Scriptable.
Syntax
HRESULT _NewEnum( [out, retval] IUnknown** ppUnknown ); |
Parameters
- ppUnknown
-
Return value. Pointer to a pointer to the IUnknown interface on return.
Return Value
Returns one of the following values.
- S_OK
-
Success.
- RPC_X_NULL_REF_POINTER
-
ppUnknown is a null pointer.
- E_OUTOFMEMORY
-
Failed during copy.
Remarks
IMessengerServices::_NewEnum returns a copy of the current collection object. It is a standard method in any collection object. This avoids problems if multiple users are accessing the same remote object and ensures that objects in the collections do not change during a traverse of the list.
If this method is called while the client is offline, the returned object is a working copy from an object perspective. However, if the copy is obtained while the client is offline, the contact list always has zero members and zero count. This should be avoided.
Example
The example gets an IEnumerator type and calls MoveNext to retrieve the next item in the services collection.
Copy Code | |
---|---|
IEnumerator e = this.mServices.NewEnum(); if (e.MoveNext()) { //do some work } |
Requirements
- Client
-
Requires Microsoft DirectX 9.0, C Runtime libraries (msvcm80.dll) on Microsoft Windows© Vista, Microsoft Windows XP Service Pack 1 (SP1) or later, or Microsoft Windows 2000 with Service Pack 4 (SP4). Any Communicator-imposed restrictions apply. .
- Server
-
Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.
- Product
-
Microsoft Office Communicator 2007 Automation API
- IDL file
-
Msgrua.idl