| Previous | Next |
| STG_E_NOTSIMPLEFORMAT | STG_E_TERMINATED |
STG_E_INCOMPLETE
Downloaded storage file is incomplete
STG_E_INCOMPLETE is HRESULT 2147680769 (0x80030201) from winerror.h. AllStat describes it as “The file download was aborted abnormally. The file is incomplete.” The result belongs to asynchronous or incremental retrieval of a file being exposed through storage APIs. The important boundary is not merely failure but which object and state transition established: the transfer ended abnormally before the complete storage payload became available.
The decisive meaning of this result is that the transfer ended abnormally before the complete storage payload became available. The severity bit does not decide handling; the controlling fact is that the transfer ended abnormally before the complete storage payload became available. Interpret it at the native boundary before a wrapper hides the condition that the transfer ended abnormally before the complete storage payload became available.
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 this HRESULT must distinguish caller, runtime, provider, and backing resource while testing whether the transfer ended abnormally before the complete storage payload became available.
Typical causes and interpretation boundary
The immediate contract boundary is specific: the transfer ended abnormally before the complete storage payload became available. Common cause branches include the following:
- Network transfer was interrupted.
- The source closed before the declared length arrived.
- A partial cache entry was mistaken for a complete document.
Confirm the cause branch that explains why the transfer ended abnormally before the complete storage payload became available by using call arguments, object state, metadata, device information, or provider traces.
Correct handling and recovery
The primary recovery is to discard or quarantine the partial artifact, resume only with validated range and identity information, and reopen after completion. The result failure report should expose enough asynchronous or incremental retrieval of a file being exposed through storage APIs state to understand why the transfer ended abnormally before the complete storage payload became available without a production debugger.
Retry this result only when evidence shows the state behind “the transfer ended abnormally before the complete storage payload became available” can change and the operation is repeatable. Reconcile persistent, remote, device, or ownership state before repeating it.
Practical scenario
A browser helper receives half of a compound document before the connection resets; it refuses to parse directory sectors from the partial cache. Record the decisive state for this HRESULT and verify recovery on a fresh object or request generation.
Difference from related HRESULTs
STG_E_TERMINATED records an intentional termination; it emphasizes that the available file is incomplete after abnormal abortion Tests and telemetry should preserve that boundary for this HRESULT.
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.
Administrators should repair the component owning asynchronous or incremental retrieval of a file being exposed through storage APIs as a versioned unit instead of copying arbitrary DLLs. Repair for this HRESULT should target only the evidence-backed component, provider, document, device, or configuration.
References
- Microsoft: COM error codes for STG and RPC
- Microsoft: Structured Storage
- Microsoft: IStorage
- Microsoft: IStream
Looking for a different code? Search another status or error code.
