| Previous | Next |
| DISP_E_PARAMNOTOPTIONAL | DISP_E_NOTACOLLECTION |
DISP_E_BADCALLEE
Automation callee violated the dispatch contract
DISP_E_BADCALLEE is HRESULT 2147614736 (0x80020010) from winerror.h. The documented description is “Invalid callee.” The value must be interpreted at IDispatch::Invoke after control transfers to a target implementation.
The target object behaved inconsistently with the Automation calling convention or returned malformed call data.
Where the result appears
- This result is returned while Automation binds or executes IDispatch::Invoke after control transfers to a target implementation.
Typical causes and interpretation
Common cause categories are: a custom IDispatch implementation corrupts DISPPARAMS; output VARIANT is invalid; exception translation breaks ABI; proxy and server disagree.
Key distinction: the target object behaved inconsistently with the Automation calling convention or returned malformed call data.
Evidence to preserve
- Record it with the object CLSID or ProgID, interface identity, member DISPID, dispatch flags, and type-library version.
- Capture callee CLSID and version; DISPID; EXCEPINFO; output VARIANT; stack and marshaling diagnostics; proxy/stub versions.
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 isolate the faulty component, validate its IDispatch implementation and output ownership, and do not hide the defect with broad argument retries.
Practical scenario
A custom server writes a BSTR pointer without setting the result VARTYPE; correcting the implementation resolves the callee failure.
Difference from related HRESULTs
DISP_E_EXCEPTION is a valid application exception returned through Automation; it indicates the callee contract itself is broken.
References
Looking for a different code? Search another status or error code.