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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED remain essential.

Contract boundary

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

  • Associate DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED with one exact operation in RegisterDragDrop, RevokeDragDrop, DoDragDrop, window lifetime, and IDropTarget ownership.
  • Confirm that DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED came from entering the modal DoDragDrop tracking loop, rather than from cleanup or a wrapper that ran afterward.
  • Preserve any IErrorInfo, underlying Win32 result, provider message, or callback failure that preceded DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED; the HRESULT alone should not erase a more specific cause.

Likely cause branches

  • DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED can result when mouse and touch handlers both start a drag for the same gesture.
  • DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED can result when reentrant message processing triggers another command during DoDragDrop.
  • DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED can result when an asynchronous completion path starts a new drag before the previous source receives final cleanup.

Evidence to preserve

A useful DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED incident records the HWND value, creating thread, apartment type, registration state, IDropTarget identity, active drag sequence, mouse capture, and destruction or recreation events. For DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, 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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, redact content and credentials while preserving types, lengths, hashes, opaque identities, and lifecycle generations needed to reproduce its contract.

  • For DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, assign a drag-session identifier before calling DoDragDrop.
  • For DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, log input gesture, source object, initiating control, and nested message path.
  • For DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, disable or coalesce commands capable of starting a drag until the modal call returns.

Diagnostic sequence

  1. Capture DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED 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. Assign a drag-session identifier before calling DoDragDrop.
  4. Log input gesture, source object, initiating control, and nested message path.
  5. Disable or coalesce commands capable of starting a drag until the modal call returns.
  6. Reproduce DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED 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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, 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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED 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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED 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; DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED rejects overlapping drag sessions. For DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, keep those outcomes separate in exception mappings, telemetry dimensions, user messages, and automated retry policy.

Developer and administrator guidance

For DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED, own registration state on the HWND’s UI thread, tie it to the window generation, and guard DoDragDrop against reentrant starts. Regression coverage for DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED 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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED 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 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED so the change can be attributed and reversed.

References


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