| Previous | Next |
| DISP_E_MEMBERNOTFOUND | DISP_E_TYPEMISMATCH |
DISP_E_PARAMNOTFOUND
Automation parameter or named argument was not found
DISP_E_PARAMNOTFOUND is HRESULT 2147614724 (0x80020004) from winerror.h. The documented description is “Parameter not found.” The value must be interpreted at IDispatch::Invoke argument binding and optional-parameter processing.
A named parameter DISPID or required argument reference does not exist in the invoked member signature.
Where the result appears
- This result is returned while Automation binds or executes IDispatch::Invoke argument binding and optional-parameter processing.
Typical causes and interpretation
Common cause categories are: the named argument spelling maps to no DISPID; the caller uses a parameter from another version; optional arguments are encoded incorrectly.
Key distinction: a named parameter DISPID or required argument reference does not exist in the invoked member signature.
Evidence to preserve
- Record it with the object CLSID or ProgID, interface identity, member DISPID, dispatch flags, and type-library version.
- Capture member DISPID; named DISPIDs; cArgs and cNamedArgs; argument order; type-library signature; arg-error index.
Logs should expose enough structure to reproduce the failure without becoming a secondary store of sensitive input data.
Correct handling and recovery
The appropriate recovery is to resolve names against the current type library, build DISPPARAMS in reverse positional order, and represent omitted optional values as documented.
Practical scenario
A script calls a renamed optional argument by its old DISPID; reading the current type information identifies the replacement name.
Difference from related HRESULTs
DISP_E_BADPARAMCOUNT reports the wrong number of arguments; it points to an argument identifier that cannot be bound.
References
Looking for a different code? Search another status or error code.