| Previous | Next |
| INPUT_E_OUT_OF_ORDER | INPUT_E_MULTIMODAL |
INPUT_E_REENTRANCY
The scope of INPUT_E_REENTRANCY is pointer sequencing and interaction state. An input operation was invoked from inside a callback or event handler where nested processing is forbidden. Keep 0x80400001 beside the returning method because a wrapper can replace this distinction with a generic subsystem message.
Limits of this code
This is not a generic multithreading error. The same operation may be legal on the same thread immediately after the callback unwinds. Do not create a nested message loop or block waiting for a deferred operation from inside the callback; both approaches can preserve the prohibited stack and deadlock delivery.
Start with the returning API
When it is returned, pointer delivery is a state machine, not a stream of interchangeable coordinates. Windows associates samples with a pointer identity, frame, device, modality, timestamp domain, and callback phase. Sequence failures are therefore diagnosed by reconstructing when the interaction began, which modality owns it, and whether the caller re-entered the same state machine before the previous notification completed.
Inspect the following boundary: the callback may hold internal input state while Windows is delivering an interaction result. Calling a state-changing API synchronously from that stack can recurse into the same context before the first delivery has completed.
Diagnostic evidence matrix
| Record | Why it matters here |
|---|---|
| Callback name and interaction or pointer context handle | Recording callback name and interaction or pointer context handle separates the pointer sequencing and interaction state boundary from a later wrapper symptom. |
| Thread ID, callback depth, and message or event being delivered | In this result diagnostics, recording thread ID, callback depth, and message or event being delivered ties the HRESULT to the pointer sequencing and interaction state boundary rather than to the final visible failure. |
| The nested API call and every argument passed to it | Comparing the nested API call and every argument passed to it shows whether this result follows input, object state, or environment. |
| Whether a dispatcher post, queue, or deferred task is already available | Preserving whether a dispatcher post, queue, or deferred task is already available provides the evidence needed to test this distinction: this is not a generic multithreading error. |
Useful comparison axes
| Test | Interpretation | Hold constant |
|---|---|---|
| Same environment, reduced input | If this result disappears with a smaller faithful case, complexity within pointer sequencing and interaction state is implicated. | Keep callback name and interaction or pointer context handle fixed while simplifying the nested API call and every argument passed to it. |
| Same input, fresh object generation | If this result changes after rebuilding state, examine ownership across the packet producer, frame collector, and interaction consumer. | Place thread ID, callback depth, and message or event being delivered on the timeline of the last successful transition. |
| Same operation on a controlled second path | If this result follows one environment, the failure is not explained by source data alone. | Compare pointer type, device identity, window, DPI context, and callback phase while preserving whether a dispatcher post, queue, or deferred task is already available. |
Reproduce without destructive cleanup
Use one live pointer and one monotonic time source, then add replay, modality changes, or callback-triggered work separately., a test that changes timestamp generation and callback dispatch at the same time cannot identify which contract was violated.
- When it is returned, replace the nested call with a posted operation that runs after the callback returns.
- Keep the same context and inputs so only call timing changes.
- add a callback-depth assertion in diagnostic builds.
- When it is returned, test cancellation and object destruction so deferral does not use a stale context.
What success must demonstrate
A correction for it should let the operation at the pointer sequencing and interaction state boundary complete repeatedly under the original supported conditions. Repeat the control that begins with “Replace the nested call with a posted operation that runs after the callback returns” and confirm that the following lifecycle step also succeeds. Keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.
Technical references
When it is returned, these references define the public API family, object model, or error list used to interpret this status.
- Microsoft: COM error codes for Input and graphics.
- Microsoft: Pointer Input Messages and Notifications.
- Microsoft: POINTER_INFO structure and pointer lifetime.
- Microsoft: GetPointerFrameInfoHistory.
- Microsoft: Interaction Context API.
Looking for a different code? Search another status or error code.