PRB: Error 0x80020005 (-2147352571) from IDispatch::Invoke()

Last reviewed: October 27, 1997
Article ID: Q175617
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) on the following platform: - Windows 95

SYMPTOMS

You get the error DISP_E_TYPEMISMATCH when using IDispatch::Invoke().

CAUSE

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.

RESOLUTION

Reverse the order of arguments in your DISPPARAMS structure.

STATUS

This behavior is by design.

REFERENCES

Win32 SDK online documentation: IDispatch::Invoke(); Passing Parameters section


Additional query words: Visual C++ -2147352571 DISP_E_TYPEMISMATCH "Type
mismatch"
Keywords : BseMisc kberrmsg
Version : Win95
Platform : Win95
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.