IStorage::EnumElements method
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.
Syntax
HRESULT EnumElements( [in] DWORD reserved1, [in] void *reserved2, [in] DWORD reserved3, [out] IEnumSTATSTG **ppenum );
Parameters
- reserved1 [in]
-
Reserved for future use; must be zero.
- reserved2 [in]
-
Reserved for future use; must be NULL.
- reserved3 [in]
-
Reserved for future use; must be zero.
- ppenum [out]
-
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.
- S_OK
-
The enumerator object was successfully returned.
- E_PENDING
-
Asynchronous Storage only: Part or all of the element's data is currently unavailable. For more information see IFillLockBytes and Asynchronous Storage.
- STG_E_INSUFFICIENTMEMORY
-
The enumerator object could not be created due to lack of memory.
- STG_E_INVALIDPARAMETER
-
One of the parameters was not valid.
- STG_E_REVERTED
-
The storage object has been invalidated by a revert operation above it in the transaction tree.
Remarks
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 order in which the elements are enumerated and whether the enumerator is a snapshot or always reflects the current state of the storage object, and depends on the IStorage implementation.
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_IStorage is defined as 0000000B-0000-0000-C000-000000000046 |
See also