What does HRESULT 0x80030102 (STG_E_REVERTED) mean?

 
Previous Next
STG_E_NOTCURRENT STG_E_CANTSAVE

STG_E_REVERTED

Why existing COM pointers become unusable

STG_E_REVERTED is a transaction-lifetime error. In transacted Structured Storage, IStorage::Revert discards changes made since the last commit. When a parent storage is reverted, child storages and streams opened from it are invalidated. Continuing to use a cached child interface can then return STG_E_REVERTED; apart from releasing it, that object must no longer be treated as a live view of the document.

This is different from a file that disappeared from disk. The storage hierarchy still exists conceptually, but the caller’s particular interfaces belong to a transaction branch that was rolled back.

Recovery and design

  • Release the invalid child interfaces and reopen the required storage or stream from a valid parent.
  • Make transaction ownership explicit: the component that calls Revert must notify consumers that hold descendants.
  • Avoid holding child streams across UI cancellation, rollback, or retry boundaries without a clear re-acquisition step.
  • Log the sequence of open, commit, and revert operations; the final HRESULT alone does not reveal which parent invalidated the object.

References


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