IStorage::EnumElements method (objidl.h)

The EnumElements method retrieves a pointer to an enumerator object that can be used to enumerate the storage and stream objects contained within this storage object.


HRESULT EnumElements(
  DWORD        reserved1,
  void         *reserved2,
  DWORD        reserved3,
  IEnumSTATSTG **ppenum



Reserved for future use; must be zero.


Reserved for future use; must be NULL.


Reserved for future use; must be zero.


Pointer to IEnumSTATSTG* pointer variable that receives the interface pointer to the new enumerator object.

Return value

This method can return one of these values.


The enumerator object returned by this method implements the IEnumSTATSTG interface, one of the standard enumerator interfaces that contain the Next, Reset, Clone, and Skip methods. IEnumSTATSTG enumerates the data stored in an array of STATSTG structures.

The storage object must be open in read mode to allow the enumeration of its elements.

The enumerator object is permitted to enumerate the elements in any order. The enumerator object is also permitted to treat the enumeration as a snapshot or to have the enumeration reflect the current state of the storage object.


Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header objidl.h
Library Uuid.lib
DLL Ole32.dll

See also


IStorage - Compound File Implementation