Click to Rate and Give Feedback
MSDN
MSDN Library
COM
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Component Automation
IEnumVARIANT Interface

Updated: November 2007

The IEnumVARIANT 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.

Implemented by

Used by

Header file name

Applications that expose collections of objects

Applications that access collections of objects

Oleauto.h (32-bit systems)

Dispatch.h (16-bit systems)

The following is the definition that results from expanding the parameterized type IEnumVARIANT:

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.

IEnumVARIANT Methods

Description

Clone

Creates a copy of the current state of enumeration.

Next

Gets the next items in the enumeration sequence

Reset

Resets the enumeration sequence to the beginning.

Skip

Attempts to skip over the next celt elements in the enumeration sequence.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker