What does HRESULT 0x80400001 (INPUT_E_REENTRANCY) mean?

 
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. For INPUT_E_REENTRANCY, 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 INPUT_E_REENTRANCY 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 in the INPUT_E_REENTRANCY path. For INPUT_E_REENTRANCY, 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.

For INPUT_E_REENTRANCY, 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

RecordWhy it matters here
Callback name and interaction or pointer context handleFor INPUT_E_REENTRANCY, 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 deliveredIn INPUT_E_REENTRANCY 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 itComparing the nested API call and every argument passed to it shows whether INPUT_E_REENTRANCY follows input, object state, or environment.
Whether a dispatcher post, queue, or deferred task is already availablePreserving 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. The same operation may be legal on the same thread immediately after the callback unwinds.

Useful comparison axes

TestInterpretationHold constant
Same environment, reduced inputIf INPUT_E_REENTRANCY disappears with a smaller faithful case, complexity within pointer sequencing and interaction state is implicated.For INPUT_E_REENTRANCY, 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 generationIf INPUT_E_REENTRANCY changes after rebuilding state, examine ownership across the packet producer, frame collector, and interaction consumer.For INPUT_E_REENTRANCY, 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 pathIf INPUT_E_REENTRANCY follows one environment, the failure is not explained by source data alone.For INPUT_E_REENTRANCY, 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

For INPUT_E_REENTRANCY, use one live pointer and one monotonic time source, then add replay, modality changes, or callback-triggered work separately. When INPUT_E_REENTRANCY is returned, a test that changes timestamp generation and callback dispatch at the same time cannot identify which contract was violated.

  1. When INPUT_E_REENTRANCY is returned, replace the nested call with a posted operation that runs after the callback returns.
  2. Keep the same context and inputs so only call timing changes in the INPUT_E_REENTRANCY path.
  3. For INPUT_E_REENTRANCY, add a callback-depth assertion in diagnostic builds.
  4. When INPUT_E_REENTRANCY is returned, test cancellation and object destruction so deferral does not use a stale context.

What success must demonstrate

A correction for INPUT_E_REENTRANCY 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. For INPUT_E_REENTRANCY, keep the original failing sample and one deliberate negative case so fallback cannot be mistaken for repair.

Technical references

When INPUT_E_REENTRANCY is returned, these references define the public API family, object model, or error list used to interpret this status.


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