IEnumSTATPROPSTG-Compound File Implementation

The compound file implementation of the IEnumSTATPROPSTG interface is used to enumerate properties, resulting in STATPROPSTG structures, which contain statistical property data. The implementation of IPropertyStorage manages the statistical data and is associated with a current compound file storage object.

The constructor in the COM implementation of IEnumSTATPROPSTG creates a class that reads the entire property set, and creates a static array which can be shared when IEnumSTATPROPSTG::Clone is called.

When to Use

Call the compound file implementation of IEnumSTATPROPSTG to enumerate the STATPROPSTG structures that contain data about the properties within the current property set. When using the compound file implementation of the property storage interfaces, call IPropertyStorage::Enum to return a pointer to IEnumSTATPROPSTG to manage the property storage object and the elements within it.

Remarks

IEnumSTATPROPSTG::Next

Gets the next one or more STATPROPSTG structures (the number is specified by the celt parameter). Returns S_OK if successful.

IEnumSTATPROPSTG::Skip

Skips the number of elements specified in celt. The next element to be enumerated through a call to Next then becomes the element after the skipped elements. Returns S_OK if celt elements were skipped; returns S_FALSE if fewer than celt elements were skipped.

IEnumSTATPROPSTG::Reset

Sets the cursor to the beginning of the enumeration. If successful, returns S_OK, otherwise, returns STG_E_INVALIDHANDLE.

IEnumSTATPROPSTG::Clone

Uses the constructor for the IEnumSTATPROPSTG to create a copy of the array. Because the class that constructs the static array actually contains the object, this function mainly adds to the reference count.

STATPROPSTG

IPropertyStorage::Enum