| Previous | Next |
| VIEW_E_DRAW | REGDB_E_WRITEREGDB |
REGDB_E_READREGDB
Could not read key from registry
REGDB_E_READREGDB is the failure HRESULT 2147746128 (0x80040150, signed -2147221168) from winerror.h. AllStat defines it as “Could not read key from registry”. In practical terms, COM could not read required registration data. Interpret it in the context of resolving class, interface, proxy, server, or activation metadata from the registration database.
The high bit in 0x80040150 is set, so this is a failure rather than a success or informational result. Its facility field is 4 (FACILITY_ITF) and its low 16-bit code is 336 (0x0150). Those bit fields classify the value, but they do not identify the failing object by themselves; the native method, object identity, and first producer of this result remain essential.
Contract boundary
Understanding this result requires this subsystem context: 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 resolving class, interface, proxy, server, or activation metadata from the registration database, rather than from cleanup or a wrapper that ran afterward.
- Preserve any IErrorInfo, underlying Win32 result, provider message, or callback failure that preceded it; the HRESULT alone should not erase a more specific cause.
Likely cause branches
- It can result when the process lacks read access to a required key or value.
- It can result when the registry hive or mounted user profile is unavailable or corrupt.
- It can result when security software, deployment, or concurrent uninstall leaves a key unreadable during activation.
Evidence to preserve
A useful incident records the CLSID or IID, registry view, process architecture, user or machine hive, server path, ThreadingModel text, package identity, access result, and deployment version. Also retain the application and component build, architecture, process and thread IDs, COM apartment, operation correlation ID, elapsed time, and the first state-changing event before the failure. When logging it, redact content and credentials while preserving types, lengths, hashes, opaque identities, and lifecycle generations needed to reproduce its contract.
- identify the exact CLSID/IID and registry view used by the failing process.
- compare access with RegOpenKeyEx under the same token without broad elevation.
- inspect deployment and registry event logs around the first unreadable key.
Diagnostic sequence
- Capture it at the first native return before a wrapper maps it to a generic exception.
- Identify the exact object, method, and lifecycle phase involved in resolving class, interface, proxy, server, or activation metadata from the registration database.
- Reproduce it with one controlled input or state change, and verify that the correction changes the decisive evidence rather than merely hiding the result.
Recovery and retry
Correction. for it, restore correct ACLs or registration through the owning installer and retry from a fresh activation path. Retry boundary. Retry may be transient during profile load or deployment, but repeated access denial requires repair rather than elevation of the application. 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 32-bit service reads the Wow6432Node registration whose ACL was replaced by a manual import; repairing the product registration restores normal activation. This isolates it within COM registration database lookup and activation metadata and provides a regression test for the stated correction.
Difference from related HRESULTs
REGDB_E_KEYMISSING means the key is absent; it means the key path was reached but required data could not be read. Keep those outcomes separate in exception mappings, telemetry dimensions, user messages, and automated retry policy.
Developer and administrator guidance
Treat registration as deployment data, record architecture and scope on every lookup, validate ThreadingModel text, and avoid runtime self-repair that guesses missing keys. Regression coverage for it should include 32-bit and 64-bit views, per-user and per-machine registration, missing and malformed values, packaged and unpackaged activation, access denial, and upgrade rollback.
Operational repair for it must target the evidence-backed owner: use the product’s supported installer or package deployment path and inspect the same registry view as the failing process; do not create CLSID or IID entries from a different machine. Retain before-and-after traces for it so the change can be attributed and reversed.
References
- Microsoft: generic COM error codes
- Microsoft: HRESULT values
- Microsoft: registering COM components
- Microsoft: InprocServer32
- Microsoft: COM registry keys
Looking for a different code? Search another status or error code.
