| Previous | Next |
| E_CHANGED_STATE | E_ILLEGAL_METHOD_CALL |
E_ILLEGAL_STATE_CHANGE
Requested transition is not permitted
E_ILLEGAL_STATE_CHANGE is HRESULT 2147483661 (0x8000000D) from winerror.h. The documented description is “An illegal state change was requested.” 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.
The immediate focus is a state-machine transition that is structurally invalid from the object current state, such as reopening a terminal object or committing before preparation.
What to verify
Verify that the current state and allowed transition table are known from the owning API rather than guessed from UI labels. Validate this condition using the owning API state, not an inferred UI symptom.
Correct handling and recovery
Do not force the transition. Move through the documented intermediate states or create a new object when the current instance is terminal.
Practical scenario
A media session receives a request to return from Closed to Running. The controller creates a new session and reattaches sources instead of mutating the closed instance.
Difference from nearby HRESULTs
It rejects a transition; E_ILLEGAL_METHOD_CALL rejects a method invocation at the current time even when no explicit state mutation was requested.
References
Looking for a different code? Search another status or error code.
