| Previous | Next |
| CO_E_ACNOTINITIALIZED | RPC_E_UNEXPECTED |
CO_E_CANCEL_DISABLED
COM call cancellation is disabled
CO_E_CANCEL_DISABLED is HRESULT 2147549504 (0x80010140) from winerror.h. AllStat describes it as “Call Cancellation is disabled.” The value must be interpreted at CoCancelCall or cancellation-aware COM call control, because the same high-level symptom can come from a different contract boundary and require different cleanup.
The decisive Interpretation is that the caller attempted to cancel a call on a thread or call context where cancellation has not been enabled. The operational record for it needs the native value, symbolic constant, component build, and call phase; the message alone is insufficient.
Where the result appears
- This result may surface in CoCancelCall or cancellation-aware COM call control.
- The first boundary to preserve for it is the exact activation, initialization, call-control, or lifetime step that returned it.
- record whether the failure occurred before an object identity existed, while a method was running, or during shutdown; those phases imply different ownership and retry rules.
Separate caller state from runtime and server state first; otherwise cleanup and retry may target the wrong generation of the operation.
Typical causes and interpretation boundary
Common cause categories for it are: the thread never enabled cancellation; cancellation was disabled too early; the wrong thread is targeted; no cancellable call context exists. Each possible cause of this result predicts different outputs and recovery behavior, which should be verified explicitly.
The check that separates this result from nearby HRESULTs is: the caller attempted to cancel a call on a thread or call context where cancellation has not been enabled. Without proof of the distinguishing condition for it, the safest action is to preserve evidence and refrain from destructive cleanup.
Correct handling and recovery
The appropriate recovery is to enable cancellation on the calling thread before the operation, balance enable and disable calls, and use operation-specific cancellation where available. Repeat the operation only after the failed condition has changed and the caller can distinguish a duplicate effect.
When it is returned, use the documented output contract and reconcile remote or persistent effects before replaying the request.
Practical scenario
A worker tries to cancel its long remote call without first enabling COM call cancellation; initialization is corrected at worker startup.
An automated test for it should verify raw HRESULT, output ownership, cleanup behavior, and the absence of an unsafe automatic retry.
Difference from related HRESULTs
RPC_E_CALL_CANCELED means cancellation actually terminated a call; this result means the cancellation mechanism was unavailable.
The comparison matters operationally for it: one result may permit fallback while the other requires repair, cancellation, or state reconciliation.
Developer and administrator guidance
Code handling it should classify it by lifecycle and ownership rather than by the high bit alone. For <code>it</code>, initialization failures normally require rebuilding the process or thread environment, capability results require a fallback, and uncertain remote outcomes require reconciliation before retry.
Operational dashboards should keep it distinct from generic COM failures and attach deployment, service, package, runtime, policy, and architecture dimensions. Administrators should avoid broad registry edits, blanket firewall changes, or permission expansion unless the captured evidence for it identifies that subsystem.
References
- Microsoft: CoInitializeEx
- Microsoft: COM security defaults
- Microsoft: common HRESULT values
- Microsoft: HRESULT values
Looking for a different code? Search another status or error code.