IEnumWbemClassObject

[This is preliminary documentation and subject to change.]

The IEnumWbemClassObject interface is similar to a standard Component Object Model (COM) enumerator. It works with objects of type IWbemClassObject. However, some extensions over standard COM enumerators have been added to accommodate Web-Based Enterprise Management (WBEM) requirements.

The enumerator is a logical container of Common Information Model (CIM) objects, and is designed for sequential retrieval. An enumerator has a current position, or cursor beginning, at offset zero, the first element, and moves sequentially through the set of objects. When you call the Reset method, once again the current position is set to zero, or the first object. Calling the Next method retrieves the requested objects. It updates the current position so that subsequent calls to Next retrieve the objects. Eventually, you reach the end of the sequence, and cannot retrieve any more objects. At this point, you can restart the enumerator by calling Reset, or you can discard it by using the Release method.

For documentation on the semantics of COM enumerators, see IEnumVariant in the Microsoft® Platform SDK. The IEnumWbemClassObject interface semantically resembles the standard enumerators, except that it is designed also to support asynchronous and semisynchronous call behavior.

Methods in Vtable Order

IUnknown Methods Description
QueryInterface Determines if the current object supports a given interface.
AddRef Increases the object's reference count by 1.
Release Decrements the object's reference count by 1, and frees the object when the reference count is zero.

IEnumWbemClassObject Methods Description
Reset Resets the cursor position to zero so that the enumeration can be repeated.
Next Retrieves the next object or objects in the enumeration starting from the current position.
NextAsync Retrieves the next object or objects using asynchronous integration with IWbemObjectSink.
Clone Makes a logical copy of the enumerator.
Skip Skips over the object or objects, resulting in a new cursor position.