IEnumSTATSTG interface
The IEnumSTATSTG interface enumerates an array of STATSTG structures. These structures contain statistical data about open storage, stream, or byte array objects. IEnumSTATSTG has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone.
When to implement
Implement IEnumSTATSTG to enumerate the elements of a 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, IEnumSTATSTG is implemented on that object, and a pointer is returned through a call to IStorage::EnumElements. If you are doing a custom implementation of a storage object, you must implement IEnumSTATSTG to fill a caller-allocated array of STATSTG structures, each of which contains data about the nested elements in the storage object.
When to use
Containers call methods that return a pointer to IEnumSTATSTG, so the container can manage its storage object and the elements within it. Calls to the IStorage::EnumElements method supply a pointer to IEnumSTATSTG. The caller allocates an array of STATSTG structures and the IEnumSTATSTG methods fill each structure with the statistics about one of the nested elements in the storage object. If present, the lpszName member of the STATSTG structure requires additional memory allocation through the IMalloc interface, and the caller must free this memory, if allocated, by calling the IMalloc::Free method. If the lpszName member is NULL, no memory is allocated, and, therefore, no memory must be freed.
Members
The IEnumSTATSTG interface inherits from the IUnknown interface. IEnumSTATSTG also has these types of members:
Methods
The IEnumSTATSTG interface has these methods.
| Method | Description |
|---|---|
| Clone |
Creates a new enumerator that contains the same enumeration state as the current STATSTG structure enumerator. |
| Next |
Gets a specified number of STATSTG structures. |
| Reset |
Resets the enumeration sequence to the beginning of the STATSTG structure array. |
| Skip |
Skips a specified number of STATSTG structures in the enumeration sequence. |
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
|
Library |
|
|
DLL |
|
|
IID |
IID_IEnumSTATSTG is defined as 0000000D-0000-0000-C000-000000000046 |
See also