What does HRESULT 0x80040152 (REGDB_E_KEYMISSING) mean?

 
Previous Next
REGDB_E_WRITEREGDB REGDB_E_INVALIDVALUE

REGDB_E_KEYMISSING

Could not find the key in the registry

The native value 0x80040152 is REGDB_E_KEYMISSING, unsigned 2147746130 and signed -2147221166. The documented description is “Could not find the key in the registry”. Treat it as evidence that a required COM registration key does not exist; the operation in progress is locating a CLSID, IID, AppID, proxy/stub, type library, or server registration subtree.

Operational meaning

COM registration is architecture-, scope-, and identity-sensitive. A key visible in Registry Editor is not proof that the failing process sees the same view or that the values form a coherent activation contract.

  • Associate this result with one exact operation in CLSID/IID registry lookup, InprocServer32 or LocalServer32 metadata, interface proxy registration, package policy, and threading-model interpretation.
  • Confirm that this result came from locating a CLSID, IID, AppID, proxy/stub, type library, or server registration subtree, rather than from cleanup or a wrapper that ran afterward.

Cause model

  • It can result when installation never registered the component for this architecture.
  • It can result when an uninstall or cleanup removed a shared key still referenced by another product.
  • It can result when the caller uses the wrong CLSID/IID or registry view.

Troubleshooting workflow

  1. Identify the exact object, method, and lifecycle phase involved in locating a CLSID, IID, AppID, proxy/stub, type library, or server registration subtree.
  2. Search both 32-bit and 64-bit views only to diagnose, not to merge them.
  3. Map the missing key back to the product manifest or installer component.
  4. Verify per-user versus per-machine registration and package identity.

What to log

Correction strategy

Correction. repair or reinstall the owning component, or correct the identifier; do not create an empty key because COM needs coherent values beneath it. Retry condition. Retry after registration repair or identifier correction, then start a fresh object activation so cached lookup state is not reused. Before repeating the operation, complete or roll back the installer transaction, re-read the exact user or machine registry view, and discard class factories obtained from superseded registration.

Practical scenario

A 64-bit process activates a component installed only in the 32-bit registry view; installing the matching 64-bit server is safer than duplicating keys manually.

Difference from related HRESULTs

REGDB_E_CLASSNOTREG is the common class-specific activation result; it can identify a lower-level absent registration key in other COM metadata paths.

Developer and administrator guidance

References


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