IEnumSTATPROPSETSTG

The IEnumSTATPROPSETSTG interface is used to iterate through an array of STATPROPSETSTG structures, which contain statistical information about the property sets managed by the current instance of IPropertySetStorage. IEnumSTATPROPSETSTG has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone. For general information on these methods, refer to IEnumXXXX.

The implementation defines the order in which the property sets are enumerated. Property sets that are present when the enumerator is created, and are not removed during the enumeration, will be enumerated only once. Property sets added or deleted while the enumeration is in progress may or may not be enumerated, but, if enumerated, will not be enumerated more than once.

For information on how the OLE compound document implementation of IEnumSTATPROPSETSTG:Next supplies members of the STATPROPSETSTG structure, refer to IEnumSTATPROPSETSTG--Compound File Implementation.

When to Implement

IEnumSTATPROPSETSTG is implemented to enumerate the property sets supported by the current property set storage object. If you are using the compound file implementation of the storage object, a pointer to which is available through a call to StgCreateDocfile, IEnumSTATPROPSETSTG is implemented on that object, and a pointer is returned through a call to IPropertySetStorage::Enum. If you are doing a custom implementation of IPropertySetStorage, you need to implement IEnumSTATPROPSETSTG to fill in a caller-allocated array of STATPROPSETSTG structures, each of which contains information about the nested elements in the storage object.

When to Use

Call IPropertySetStorage::Enum to return a pointer to IEnumSTATPROPSETSTG, the methods of which can then be called to enumerate STATPROSETSTG structures so the application can manage its property sets.

The prototypes of the methods are as follows:

HRESULT Next(
  ULONG celt,           
  STATPROPSETSTG * rgelt,   
  ULONG * pceltFetched  
);
 
HRESULT Skip(
  ULONG celt  
);
 
HRESULT Reset(void)
 
HRESULT Clone(
  IEnumSTATPROPSETSTG ** ppenum  
);
 

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in objidl.h.

See Also

IPropertyStorage::Enum