ID: Q175617
The information in this article applies to:
You get the error DISP_E_TYPEMISMATCH when using IDispatch::Invoke().
The obvious cause for the error would be that you are passing the wrong type to a method. You should consult the documentation to determine if you are passing the correct type to a method.
This error may also occur when you pass multiple arguments. The arguments should be passed in reverse order. In other words, the first element of your VARIANT array in your DISPPARAMS structure should be the last parameter you want to pass.
Reverse the order of arguments in your DISPPARAMS structure.
This behavior is by design.
Win32 SDK online documentation: IDispatch::Invoke(); Passing Parameters section
Additional query words: Visual C++ -2147352571 DISP_E_TYPEMISMATCH "Type mismatch"
Keywords : kberrmsg kbnokeyword kbKernBase kbGrpKernBase
Version : Win95
Platform : Win95
Issue type : kbprb
Last Reviewed: October 29, 1997