Site icon EfmSoft

What does HRESULT 0x80004022 (CO_E_RELOAD_DLL) mean?

 
Previous Next
CO_E_NOT_SUPPORTED CO_E_MSI_ERROR

CO_E_RELOAD_DLL

COM requires a DLL to be loaded again

CO_E_RELOAD_DLL is HRESULT 2147500066 (0x80004022) from winerror.h. The documented description is “A dll must be loaded.” The value must be interpreted at in-process COM server loading, unloading, or class-factory resolution.

The runtime determined that the required DLL is not resident in the usable state and must be loaded before continuing. When this result crosses a language or process boundary, preserve its original numeric form before projections replace it with a broad exception class.

Where the result appears

  • This result may surface during in-process COM server loading, unloading, or class-factory resolution.

Typical causes and interpretation

Common cause categories are: the module was unloaded after class factories were released; dependency resolution changed; registration points to a replaced binary. Do not treat the cause list as a checklist of simultaneous failures; use traces and postconditions to select the matching branch.

Key distinction: the runtime determined that the required DLL is not resident in the usable state and must be loaded before continuing.

Correct handling and recovery

The appropriate recovery is to allow COM to perform a clean reload, keep class factories and module locks balanced, and investigate repeated unload/reload churn rather than pinning the DLL forever. A retry policy needs a bounded attempt count, a state refresh step, and a rule for reconciling work that may already have completed.

Cleanup following it must be generation-aware: do not destroy shared state or outputs owned by an earlier successful operation.

Practical scenario

A server releases its final module lock just before another activation; COM reloads the registered DLL and obtains a fresh class factory.

Coverage should include the exact failure, a corrected success case, and the closest related HRESULT so classification remains stable.

Difference from related HRESULTs

CO_E_DLLNOTFOUND means the module cannot be found; it indicates the runtime needs a valid reload.

Tests and telemetry should retain the producing component and operation so future wrappers do not flatten this result into an ambiguous generic exception.

References


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

Exit mobile version