Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This interface provides a method for enumerating a collection of variants, including heterogeneous collections of objects and intrinsic types. Callers of this interface do not need to know the specific type or types of the elements in the collection.
The following is the definition that results from expanding the parameterized type IEnumVARIANT.
Copy Code | |
---|---|
interface IEnumVARIANT : IUnknown { virtual HRESULT Next(unsigned long celt, VARIANT FAR* rgvar, unsigned long FAR* pceltFetched) = 0; virtual HRESULT Skip(unsigned long celt) = 0; virtual HRESULT Reset() = 0; virtual HRESULT Clone(IEnumVARIANT FAR* FAR* ppenum) = 0; }; |
To see how to implement a collection of objects using IEnumVARIANT, refer to the file Enumvar.cpp in the Lines sample code.
Methods
The following table shows the methods for this interface in the order that the compiler calls the methods. Like all COM interfaces, this interface inherits the methods for the IUnknowninterface.
Method | Description |
---|---|
This method attempts to get the next celtitems in the enumeration sequence, and return them through the array pointed to by rgVar. |
|
This method attempts to skip over the next celtelements in the enumeration sequence. |
|
This method resets the enumeration sequence to the beginning. |
|
This method creates a copy of the current state of enumeration. |
Requirements
Header | oaidl.h, oaidl.idl |
Library | oleaut32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |