Share via


IMessengerGroups::_NewEnum

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Enumerates the IMessengerGroup objects in a collection. Not scriptable.

Syntax

HRESULT _NewEnum(
   [out,
   retval] IUnknown** ppUnknown
);

Parameters

  • ppUnknown
    Return value. Pointer to a pointer to the IUnknown interface on the copy of the current collection object.

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

IMessengerGroups::_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() which returns a Boolean value. A True value indicates the code has not moved past the end of the collection.

IEnumerator e = this.mGroups.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

See Also

Reference

IMessengerGroups