What does HRESULT 0x80040155 (REGDB_E_IIDNOTREG) mean?

 
Previous Next
REGDB_E_CLASSNOTREG REGDB_E_BADTHREADINGMODEL

REGDB_E_IIDNOTREG

Interface not registered

REGDB_E_IIDNOTREG is the failure HRESULT 2147746133 (0x80040155, signed -2147221163) from winerror.h. AllStat defines it as “Interface not registered”. In practical terms, The requested interface identifier lacks required COM registration metadata. Interpret it in the context of interface marshaling, proxy/stub lookup, type-library resolution, or interface discovery.

The high bit in 0x80040155 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 341 (0x0155). 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 interface marshaling, proxy/stub lookup, type-library resolution, or interface discovery, 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 IID key or ProxyStubClsid32 mapping was never installed.
  • It can result when a custom interface is used across apartments or processes without registered marshaling support.
  • It can result when bitness-specific deployment registered the class but omitted interface metadata.

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.

  • record IID, source and destination apartments/processes, and marshaling path.
  • check whether the interface is automation-compatible or has a proxy/stub DLL.
  • verify type library and proxy registration for the architecture where marshaling occurs.

Diagnostic sequence

  1. Capture it at the first native return before a wrapper maps it to a generic exception.
  2. Identify the exact object, method, and lifecycle phase involved in interface marshaling, proxy/stub lookup, type-library resolution, or interface discovery.
  3. 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, install the correct proxy/stub or type library registration, or keep the interface in a context where its supported marshaler applies. Retry boundary. Retry after repairing interface registration and recreating the proxy; an existing failed proxy cannot be healed in place. 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

An in-process test passes because no proxy is needed, but the same custom interface fails when the server moves out of process; registering its generated proxy/stub fixes marshaling. This isolates it within COM registration database lookup and activation metadata and provides a regression test for the stated correction.

Difference from related HRESULTs

E_NOINTERFACE says an object does not implement an IID; it says COM lacks registration needed to describe or marshal that IID. 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


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