What does HRESULT 0x80030012 (STG_E_NOMOREFILES) mean?

 
Previous Next
STG_E_INVALIDPOINTER STG_E_DISKISWRITEPROTECTED

STG_E_NOMOREFILES

Structured-storage enumeration has no more entries

STG_E_NOMOREFILES is HRESULT 2147680274 (0x80030012) from winerror.h. The documented description is “There are no more entries to return.” The result belongs to enumeration of streams, substorages, or file-like entries. This HRESULT is most useful when tied to the method and lifecycle phase where the enumerator cannot return another entry because its sequence is exhausted.

This result means that the enumerator cannot return another entry because its sequence is exhausted. Preserve the original HRESULT and the state that made this condition true; the severity bit alone does not determine how the caller should handle it.

Where the result appears

  • This result can surface in a IStorage, IStream, ILockBytes, property storage, compound-file parsing, or persistence code.
  • Map the failure to one concrete operation among StgOpenStorage, StgCreateStorageEx, IStorage, IStream, IPropertyStorage, STATSTG, and the selected STGM mode.
  • Preserve storage path or identity, STGM mode, stream or storage name, transaction generation, file hash, and backing provider before releasing or replacing the object that returned this result.

An incident record must distinguish caller, runtime, provider, and backing resource while testing whether the enumerator cannot return another entry because its sequence is exhausted.

Typical causes and interpretation

The immediate contract boundary is specific: the enumerator cannot return another entry because its sequence is exhausted. Common cause branches include the following:

  • The caller requested beyond the final STATSTG record.
  • The storage was filtered to an empty remaining set.
  • The caller treated the terminal result as a fatal media failure.

Confirm the cause branch that explains why the enumerator cannot return another entry because its sequence is exhausted by using call arguments, object state, metadata, device information, or provider traces.

Correct handling and recovery

The primary recovery is to treat the condition as end-of-enumeration when documented by the calling method and stop requesting entries. The failure report should capture the relevant state during enumeration of streams, substorages, or file-like entries so it is clear why the enumerator cannot return another entry because its sequence is exhausted.

The owner of it must define idempotency, cancellation, attempt limits, and reconciliation for the failed enumeration of streams, substorages, or file-like entries.

Practical scenario

A migration tool drains an IEnumSTATSTG sequence, sees the terminal HRESULT, and closes the enumerator instead of retrying forever.

Difference from related HRESULTs

S_FALSE is a common COM enumeration terminator; it is a storage-family terminal result and must be handled according to the exact API.

Developer and administrator guidance

Broad permission or compatibility changes are inappropriate unless evidence for the enumerator cannot return another entry because its sequence is exhausted points to that layer.

References


Looking for a different code? Search another status or error code.