IEnumSTATPROPSETSTG-Compound File Implementation
The compound file implementation of the IEnumSTATPROPSETSTG interface is used to enumerate an array of STATPROPSETSTG structures that contain statistical property data. The IPropertySetStorage implementation manages the statistical data and is associated with a current compound file storage object.
When to Use
Call the methods of IEnumSTATPROPSETSTG to enumerate STATPROPSETSTG structures, each of which provide data about one of the property sets associated with the compound file storage object.
Remarks
-
Gets the next one or more STATPROPSETSTG structures (the number is specified by the celt parameter). The STATPROPSETSTG elements provided through a call to the compound file implementation of IEnumSTATPROPSETSTG::Next follow these rules:
- If IEnumSTATPROPSETSTG::Next cannot provide STATPROPSETSTG.fmtid, zeros are written to that member. This occurs when the property set does not have a predefined name (such as \005SummaryInformation) and is not a legal value.
- The DocumentSummaryInformation and UserDefined property set is special, in that it may have two property set sections. This property set is described in the section The DocumentSummaryInformation and UserDefined Property Sets. The second section is referred to as the User-Defined Properties. Each section is identified with a unique format identifier (FMTID). When IPropertySetStorage::Enum is used to enumerate property sets, the User-Defined property set will not be enumerated.
Note
If you always create a property set using IPropertySetStorage::Create, then, because a "Character GUID" is created for the storage name, IEnumSTATPROPSETSTG::Next will return a nonzero, valid FMTID for the property set [STATPROPSETSTG.fmtid].
- The STATPROPSETSTG.grfFlags member does not necessarily reflect whether the property set is ANSI or not. If PROPSETFLAG_ANSI is set, the property set is definitely ANSI. If PROPSETFLAG_ANSI is clear, the property set could be either Unicode or non-Unicode, because it is not possible to tell whether it is ANSI without opening it.
- The STATPROPSETSTG.grfFlags member does reflect whether the property set is simple or not, so the setting of the PROPSETFLAG_NONSIMPLE flag is always valid.
- If IEnumSTATPROPSETSTG::Next cannot provide STATPROPSETSTG.clsid, it is set to all zeroes (CLSID_NULL). In the COM compound file implementation, this occurs when the property set is simple (the PROPSETFLAG_NONSIMPLE flag is not set), or is nonsimple, but the CLSID was not explicitly set. For nonsimple property sets, the CLSID that is received is the one that is maintained by the underlying IStorage.
- If IEnumSTATPROPSETSTG::Next cannot provide the time fields [ctime, mtime, atime], each non-supported time will be set to zeroes. In the COM compound file implementation, getting these values depends on retrieving them from the underlying IStorage implementation.
-
Skips the number of elements specified in celt. Returns S_OK if the specified number of elements are skipped, returns S_FALSE if fewer elements than requested are skipped. In any other case, returns the appropriate error.
-
Sets the cursor to the beginning of the enumeration. If successful, returns S_OK, otherwise, returns STG_E_INVALIDHANDLE.
-
Copies the current enumeration state of this enumerator.