| Previous | Next |
| STG_E_INVALIDFLAG | STG_E_NOTCURRENT |
STG_E_INUSE
Busy is a state problem
STG_E_INUSE means the storage object is currently busy. Unlike STG_E_SHAREVIOLATION, it does not necessarily identify a conflicting file-open mode, and unlike STG_E_LOCKVIOLATION, it does not necessarily expose a specific lock owner. It is a signal that the requested operation is incompatible with the object’s current state or an operation already in progress.
In a Structured Storage workflow, the state can be held by a stream copy, a commit sequence, a converter, an asynchronous component, or an application-level operation that has not completed. Treat the HRESULT as an instruction to understand the lifecycle, not as proof that the physical document is corrupt.
Useful investigation steps
- Log the exact API call and whether a read, copy, commit, or mutation was already active on the same root storage.
- Serialize mutating operations per document and use a clear completion/cancellation rule for workers.
- Release references only after pending work is known to have stopped; premature disposal can create a different class of failure.
- If retrying is appropriate, use a bounded retry with a state recheck instead of a tight loop.
References
- Microsoft: COM Structured Storage error codes
- Microsoft: IStorage::Commit lifecycle
- OpenMcdf: compound-file implementation
Looking for a different code? Search another status or error code.