Site icon EfmSoft

What does HRESULT 0x80040103 (DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED) mean?

 
Previous Next
DRAGDROP_E_INVALIDHWND CLASS_E_NOAGGREGATION

DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED

A drag operation is already in progress

DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED is the failure HRESULT 2147746051 (0x80040103, signed -2147221245) from winerror.h. AllStat defines it as “A drag operation is already in progress”. In practical terms, A second OLE drag operation was started while another drag is still active. Interpret it in the context of entering the modal DoDragDrop tracking loop.

The high bit in 0x80040103 is set, so this is a failure rather than a success or informational result. Its facility field is 4 (FACILITY_ITF) and its low 16-bit code is 259 (0x0103). Those bit fields classify the value, but they do not identify the failing object by themselves; the native method, object identity, and first producer of this result remain essential.

Contract boundary

Understanding this result requires this subsystem context: OLE drag-and-drop registration is tied to an HWND, its UI thread, and a COM apartment. IsWindow checks can describe a moment in time, but lifecycle serialization is what prevents stale handles, duplicate registration, and reentrant drag sessions.

Likely cause branches

Evidence to preserve

A useful incident records the HWND value, creating thread, apartment type, registration state, IDropTarget identity, active drag sequence, mouse capture, and destruction or recreation events. Also retain the application and component build, architecture, process and thread IDs, COM apartment, operation correlation ID, elapsed time, and the first state-changing event before the failure. When logging it, redact content and credentials while preserving types, lengths, hashes, opaque identities, and lifecycle generations needed to reproduce its contract.

Diagnostic sequence

  1. Capture it at the first native return before a wrapper maps it to a generic exception.
  2. Identify the exact object, method, and lifecycle phase involved in entering the modal DoDragDrop tracking loop.
  3. Reproduce it with one controlled input or state change, and verify that the correction changes the decisive evidence rather than merely hiding the result.

Recovery and retry

Correction. for it, finish or cancel the active drag, release its source data and visual state, then allow a new user gesture to begin another session. Retry boundary. Automatic immediate retry is unsafe because it preserves the same reentrant input and can create a busy loop. Before repeating the operation, finish or cancel any active drag, pair each successful registration with one revocation, and verify that the HWND still belongs to the same window generation.

Practical scenario

A tree control begins dragging on mouse movement and a keyboard command fires through the nested message loop; a per-UI-thread drag guard suppresses the second start. This isolates it within OLE drag-and-drop registration and modal tracking and provides a regression test for the stated correction.

Difference from related HRESULTs

DRAGDROP_S_CANCEL is a normal final outcome from one drag; it rejects overlapping drag sessions. Keep those outcomes separate in exception mappings, telemetry dimensions, user messages, and automated retry policy.

Developer and administrator guidance

Own registration state on the HWND’s UI thread, tie it to the window generation, and guard DoDragDrop against reentrant starts. Regression coverage for it should include duplicate enable and disable paths, HWND recreation, framework-owned drop targets, destruction during registration, and nested input dispatch while a drag is active.

Operational repair for it must target the evidence-backed owner: identify whether the application, UI framework, shell extension, or plugin owns the target before changing configuration; machine-wide COM repair is not justified by a per-window lifecycle defect. Retain before-and-after traces for it so the change can be attributed and reversed.

References


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

Exit mobile version