| Previous | Next |
| RO_E_INVALID_METADATA_FILE | RO_E_EXCLUSIVE_WRITE |
RO_E_CLOSED
Operation targeted a closed Windows Runtime object
RO_E_CLOSED is HRESULT 2147483667 (0x80000013) from winerror.h. The documented description is “The object has been closed.” The relevant context is the Windows Runtime metadata, object lifetime, asynchronous operation, activation, and apartment model.
Where it is encountered
- C++/WinRT, WRL, .NET projections, or native WinRT ABI calls.
- Runtime-class activation, WinMD reflection, asynchronous objects, observable state, or view lifecycle.
- Cross-thread and cross-apartment handoff between UI, ASTA, STA, MTA, broker, and background work.
The immediate focus is an object with an explicit close or dispose lifetime whose methods are no longer valid after terminal closure.
What to verify
Verify that the code can identify who closed the object and whether outstanding asynchronous callbacks still retain stale references. That condition determines whether the same object can continue, a new object is required, or policy must change.
Correct handling and recovery
Stop using the instance, cancel dependent work, and obtain a new object if the operation remains necessary. Make close idempotent and coordinate it with callbacks.
Reconcile partial output and server-side effects before attempting the operation again.
Practical scenario
A stream is closed by navigation teardown while an async read callback is queued. The callback observes cancellation and does not issue another read on the closed stream.
Difference from nearby HRESULTs
It is a terminal lifetime condition; E_CHANGED_STATE can be recoverable by refreshing state on the same live object.
Developer and administrator guidance
Change the smallest component, identity, ACL, package, or threading boundary that the evidence identifies, then reproduce the same operation.
References
Looking for a different code? Search another status or error code.
