ITCollection::get__NewEnum method (tapi3if.h)
The get__NewEnum method gets an enumerator for the collection.
Syntax
HRESULT get__NewEnum(
[out] IUnknown **ppNewEnum
);
Parameters
[out] ppNewEnum
Pointer to an IUnknown interface on an enumerator object for the collection.
Call the QueryInterface method on the returned IUnknown interface to obtain a pointer to an IEnumVARIANT enumeration interface on the collection. IEnumVARIANT provides a number of methods that you can use to iterate through the collection.
For more information, see the following Remarks section.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Method succeeded. |
|
Insufficient memory exists to perform the operation. |
Remarks
Each TAPI 3 interface that includes a method that returns a collection also includes a method that returns a pointer to a TAPI 3 enumerator interface. If you are programming in C/C++, it can be easier to call a collection's enumerator method directly to obtain an enumerator object, instead of calling the ITCollection::get__NewEnum method. For example, the ITTAPI::EnumerateAddresses method returns a pointer to an IEnumAddress interface. IEnumAddress provides enumeration methods for the Address object.
If you are programming in Visual Basic, you do not need to call this method to enumerate a collection. This is because you can invoke the method's functionality implicitly using the For...Each...in...Next... construct.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | tapi3if.h (include Tapi3.h) |
Library | Uuid.lib |
DLL | Tapi3.dll |