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. AllStat describes it as “There are no more entries to return.” The result belongs to enumeration of streams, substorages, or file-like entries. The symbol this result is useful only when tied to the method and lifecycle phase where the enumerator cannot return another entry because its sequence is exhausted.

The decisive meaning of this result is that the enumerator cannot return another entry because its sequence is exhausted. The severity bit does not decide handling; the controlling fact is that the enumerator cannot return another entry because its sequence is exhausted. A reliable it diagnosis preserves the raw value and reconstructs the state that made this true: the enumerator cannot return another entry because its sequence is exhausted.

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 for it 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 boundary

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 result failure report should expose enough enumeration of streams, substorages, or file-like entries state to understand why the enumerator cannot return another entry because its sequence is exhausted without a production debugger.

The owner of it must define idempotency, cancellation, attempt limits, and reconciliation for the failed enumeration of streams, substorages, or file-like entries. Reconcile persistent, remote, device, or ownership state before repeating it.

Practical scenario

A migration tool drains an IEnumSTATSTG sequence, sees the terminal HRESULT, and closes the enumerator instead of retrying forever. Record the decisive state for it and verify recovery on a fresh object or request generation.

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 Tests and telemetry should preserve that boundary for it.

Developer and administrator guidance

Developers handling it should make object lifetime and state transitions explicit, preserve the native HRESULT, and keep cleanup paths safe when initialization or output is partial. Exercise direct and transacted modes, read-only and writable paths, cancellation, malformed input, and cleanup after partial output.

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. Repair for it should target only the evidence-backed component, provider, document, device, or configuration.

References


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