| Previous | Next |
| CO_E_SERVER_NOT_PAUSED | CO_E_CLRNOTAVAILABLE |
CO_E_CLASS_DISABLED
COM class or containing application is disabled
CO_E_CLASS_DISABLED is HRESULT 2147500071 (0x80004027) from winerror.h. AllStat describes it as “The component or application containing the component has been disabled.” The value must be interpreted at COM or COM+ activation of a class explicitly disabled by configuration or policy, because the same high-level symptom can come from a different contract boundary and require different cleanup.
The decisive interpretation for CO_E_CLASS_DISABLED is that the class registration exists, but activation is administratively disabled at the class or application level. A diagnostic event for CO_E_CLASS_DISABLED should retain both representations of the HRESULT and the exact API boundary that produced it.
Where the result appears
- CO_E_CLASS_DISABLED may surface in COM or COM+ activation of a class explicitly disabled by configuration or policy.
- The first boundary to preserve for CO_E_CLASS_DISABLED is the exact activation, initialization, call-control, or lifetime step that returned it.
- For CO_E_CLASS_DISABLED, 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.
Before assigning cause to CO_E_CLASS_DISABLED, identify the responsible thread, apartment, process, library generation, and server instance rather than relying on the final dialog text.
Typical causes and interpretation boundary
Common cause categories for CO_E_CLASS_DISABLED are: an administrator disabled the application; a failed deployment quarantined the component; policy blocks a vulnerable class. The candidate causes for CO_E_CLASS_DISABLED are alternatives, so test one precondition at a time instead of applying several broad repairs together.
The check that separates CO_E_CLASS_DISABLED from nearby HRESULTs is: the class registration exists, but activation is administratively disabled at the class or application level. When the boundary condition behind CO_E_CLASS_DISABLED has not been proven, avoid retries or repairs that assume a different neighboring HRESULT.
Evidence and telemetry
- Record CO_E_CLASS_DISABLED together with the CLSID, IID, method or control operation, server type, process architecture, and component build.
- Capture CO_E_CLASS_DISABLED evidence: CLSID and application ID; COM+ catalog state; disable time and actor; deployment policy; package status.
- Preserve the apartment model, thread ID, package or service identity, activation flags, UTC time, and correlation ID associated with CO_E_CLASS_DISABLED.
- For CO_E_CLASS_DISABLED, retain the earliest lower-level Win32, RPC, MSI, SxS, CLR, loader, or security event instead of logging only the final HRESULT.
- After CO_E_CLASS_DISABLED, mark every returned interface pointer, handle, cookie, or output parameter as valid only when the owning API explicitly says so.
Telemetry for CO_E_CLASS_DISABLED should be reproducible without copying secret values: prefer GUIDs, lengths, flags, sanitized names, and correlation IDs.
Diagnostic sequence
- Capture the raw value 0x80004027 and symbolic name CO_E_CLASS_DISABLED before a wrapper translates it to a generic exception.
- Identify the exact COM entry point and lifecycle phase for CO_E_CLASS_DISABLED: initialization, activation, QueryInterface, method execution, cancellation, registration, or teardown.
- Validate the decisive condition for CO_E_CLASS_DISABLED: the class registration exists, but activation is administratively disabled at the class or application level.
- Test the principal causes separately for CO_E_CLASS_DISABLED: an administrator disabled the application; a failed deployment quarantined the component; policy blocks a vulnerable class.
- Correlate client and server timelines, including process launch, class registration, RPC activity, security negotiation, and cleanup around CO_E_CLASS_DISABLED.
- Change one precondition at a time, reproduce CO_E_CLASS_DISABLED, and verify both the HRESULT and the object or server state after the call.
Correct handling and recovery
For CO_E_CLASS_DISABLED, the appropriate recovery is to respect the disable decision, repair or re-enable through the owning deployment system only after validation, and avoid alternate activation that bypasses policy. Before retrying CO_E_CLASS_DISABLED, specify which precondition changed and how duplicate effects or stale outputs will be detected.
For CO_E_CLASS_DISABLED, inspect every output before cleanup because interfaces, buffers, server effects, or metadata handles may be partially initialized.
Practical scenario
A vulnerable COM+ component is disabled during incident response; clients display an unavailable feature instead of retrying activation.
Test CO_E_CLASS_DISABLED by reproducing the smallest failing contract, recording postconditions, and then changing a single input or state transition.
Difference from related HRESULTs
REGDB_E_CLASSNOTREG means no usable registration was found; CO_E_CLASS_DISABLED means registration exists but policy forbids activation.
Keeping CO_E_CLASS_DISABLED separate from its neighbor improves retry, cleanup, and user messaging because the two results imply different postconditions.
Developer and administrator guidance
Code handling CO_E_CLASS_DISABLED should classify it by lifecycle and ownership rather than by the high bit alone. For <code>CO_E_CLASS_DISABLED</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 CO_E_CLASS_DISABLED 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 CO_E_CLASS_DISABLED identifies that subsystem.
References
- Microsoft: COM error codes — official Microsoft documentation relevant to
CO_E_CLASS_DISABLED. - Microsoft: COM processes, threads, and apartments — official Microsoft documentation relevant to
CO_E_CLASS_DISABLED. - Microsoft: COM security defaults — official Microsoft documentation relevant to
CO_E_CLASS_DISABLED. - Microsoft: HRESULT values — official Microsoft documentation relevant to
CO_E_CLASS_DISABLED.
Looking for a different code? Search another status or error code.