| Previous | Next |
| CO_E_OBJNOTCONNECTED | CO_E_RELEASED |
CO_E_APPDIDNTREG
Meaning
Windows documents CO_E_APPDIDNTREG as “Application was launched but it didn't register a class factory”. In practical terms, it is returned when COM launches a local server executable but the process does not register the requested class factory within the activation window.
Likely causes
- Possible cause 1: the server fails before calling CoRegisterClassObject.
- Possible cause 2: startup blocks on UI, configuration, networking or a deadlock.
- Possible cause 3: the process registers a different CLSID or uses registration flags inconsistent with activation.
Where the failure belongs
This result belongs to COM activation and object lifetime. COM activation is a sequence rather than one registry lookup: identifier resolution, class registration, module or process start, class-factory publication, marshaling, and object lifetime can fail independently. The relevant condition is that COM launches a local server executable but the process does not register the requested class factory within the activation window.
Diagnostic sequence
- Confirm that the observed path matches this condition: COM launches a local server executable but the process does not register the requested class factory within the activation window.
Evidence to collect
- Capture 1: process creation result, PID, command line and startup timestamps.
- Capture 2: the requested CLSID and every CoRegisterClassObject call made by the server.
- Capture 3: early server logs, crash reports and wait chains before registration.
Correct handling and retry
- Corrective action 1: call CoRegisterClassObject promptly after minimal initialization.
- Corrective action 2: move slow optional work after class-factory registration or report a specific startup failure.
- Corrective action 3: correct CLSID and REGCLS usage and verify registration is revoked on shutdown.
Retry guidance. Retry after the server startup cause is fixed or after a transient dependency becomes available; use bounded backoff because repeated launches can create orphaned processes. When retrying, avoid launch duplicate servers, reuse stale proxies or repeat an activation whose side effects are unknown.
Difference from nearby HRESULTs
CO_E_APPNOTFOUND means the executable could not be located; it means it launched but failed to publish the requested class factory.
Practical scenario
A local server waits indefinitely for a remote configuration endpoint before registering its class factory; registering first and completing deferred initialization removes it.
Developer and operational guidance
Official Microsoft references
Looking for a different code? Search another status or error code.
