What does HRESULT 0x80020001 (DISP_E_UNKNOWNINTERFACE) mean?

 
Previous Next
RPC_E_UNEXPECTED DISP_E_MEMBERNOTFOUND

DISP_E_UNKNOWNINTERFACE

Automation invocation received an unknown interface identifier

DISP_E_UNKNOWNINTERFACE is HRESULT 2147614721 (0x80020001) from winerror.h. AllStat describes it as “Unknown interface.” The value must be interpreted at IDispatch invocation where the reserved interface identifier must match the supported Automation contract, because the same high-level symptom can come from a different contract boundary and require different cleanup.

The decisive Interpretation is that the supplied riid is not the expected null IID for IDispatch or otherwise identifies an unsupported interface. Treat this result as a contract result from its owning subsystem and retain the unmodified HRESULT in logs and test assertions.

Where the result appears

  • This result is returned while Automation binds or executes IDispatch invocation where the reserved interface identifier must match the supported Automation contract.
  • retain the member name and DISPID, invocation flags, LCID, cArgs, cNamedArgs, and the exact VARIANTARG sequence in reverse Automation order.
  • The output contract for it includes puArgErr, EXCEPINFO, result VARIANT, by-reference values, and SAFEARRAY lock or ownership state; inspect them before cleanup.

Map this result to one concrete invocation and one concrete object or metadata identity before interpreting the human-readable description.

Typical causes and interpretation boundary

Common cause categories for it are: a caller passes a non-null IID; an interop declaration reorders parameters; a custom proxy uses the wrong dispatch contract. The evidence should distinguish configuration, lifetime, input, identity, resource, and version failures rather than grouping them.

The check that separates this result from nearby HRESULTs is: the supplied riid is not the expected null IID for IDispatch or otherwise identifies an unsupported interface. The text of it narrows the search, but the owning API state must confirm the condition before automation changes the system.

Evidence and telemetry

  • Record it with the object CLSID or ProgID, interface identity, member DISPID, dispatch flags, and type-library version.
  • capture riid value; IDispatch implementation; caller interop signature; Invoke or GetIDsOfNames call; proxy/stub version.
  • Log VARIANT type tags, dimensions, bounds, lengths, and null/empty distinctions for it, but redact actual confidential argument values.
  • Preserve the caller language/runtime, generated interop version, LCID, and whether the call crossed a process boundary when it occurs.
  • After it, call VariantClear, SysFreeString, SafeArrayDestroy, or release interfaces only for values whose ownership was transferred by the documented contract.

For privacy-safe diagnosis of it, capture the call schema and state transitions but hash or omit confidential payloads.

Correct handling and recovery

The appropriate recovery is to pass IID_NULL as required, correct the native signature, and obtain other interfaces through QueryInterface rather than IDispatch parameters. Recovery from it should name the component responsible for retry and the evidence that makes another attempt safe.

The failure path for it should leave outputs in a known state and avoid double release, double commit, or reuse of stale pointers.

Practical scenario

A hand-written P/Invoke declaration passes a type-library IID into IDispatch::Invoke; replacing it with IID_NULL fixes the call.

To prevent recurrence of it, preserve a minimal fixture that asserts both the failing condition and the state after recovery.

Difference from related HRESULTs

DISP_E_UNKNOWNNAME concerns a member name; it concerns the interface identifier argument.

Classify it by the stated contract difference, since severity bits alone do not determine the correct response.

Developer and administrator guidance

Automation adapters should handle it at the dispatch boundary and expose the member, parameter, and type information needed to repair the call. A generic retry after <code>it</code> with unchanged DISPPARAMS usually repeats the same deterministic binding error.

Deployment owners should compare the registered type library and server binary as one versioned unit. After <code>it</code>, re-registering arbitrary DLLs or changing locale system-wide is inappropriate unless the captured metadata proves registration or LCID drift.

References


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