FIX: "COMException - Type Mismatch" Error Message When You Pass a VARIANT Parameter from Managed Code

Article translations Article translations
Article ID: 818982 - View products that this article applies to.
Expand all | Collapse all

On This Page


If you call a Microsoft Foundation Classes (MFC) ActiveX control method that has a parameter of type VARIANT* from managed code, the call fails and you receive the following error message:
COMException - Type Mismatch


This problem occurs because you cannot pass a VT_VARIANT | VT_BYREF VT type VARIANT parameter from managed code. Typically, this problem affects MFC ActiveX controls and automation servers that use the VARIANT* type parameter in method calls.


To resolve this problem, obtain the hotfix installation package for the Microsoft .NET Framework 1.1. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
817703 INFO: Combined Installation Package for the .NET Framework 1.1 - Hotfixes 818981, 818982, and 822878

Hotfix Information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next .NET Framework Version 1.1 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
     Date         Time   Version            Size    File name
   23-Oct-2003  00:48  1.0.3705.465      200,704  Aspnet_isapi.dll  
   23-Oct-2003  00:02  1.0.3705.465       69,632  Corperfmonext.dll  
   23-Oct-2003  00:01  1.0.3705.465      303,104  Mscorjit.dll     
   23-Oct-2003  23:56  1.0.3705.465    1,953,792  Mscorlib.dll     
   23-Oct-2003  00:01  1.0.3705.465    2,273,280  Mscorsvr.dll     
   23-Oct-2003  00:02  1.0.3705.465    2,269,184  Mscorwks.dll     
   23-Oct-2003  00:46  1.0.3705.465       20,480  Perfcounter.dll  
   23-Oct-2003  23:49  1.0.3705.465    1,179,648  
   23-Oct-2003  23:56  1.0.3705.465    1,695,744  
   23-Oct-2003  23:48  1.0.3705.465    1,175,552  System.dll       
   23-Oct-2003  23:47  1.0.3705.465      241,664  System.messaging.dll  
   23-Oct-2003  23:47  1.0.3705.465      311,296  System.runtime.remoting.dll  
   23-Oct-2003  23:42  1.0.3705.465      131,072  System.runtime.serialization.formatters.soap.dll  
   23-Oct-2003  23:49  1.0.3705.465    1,196,032  System.web.dll   
   23-Oct-2003  23:47  1.0.3705.465      507,904  
   23-Oct-2003  23:56  1.0.3705.465    1,994,752  
   23-Oct-2003  23:49  1.0.3705.465    1,302,528  System.xml.dll   


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.


Article ID: 818982 - Last Review: October 5, 2005 - Revision: 2.4
  • Microsoft .NET Framework 1.1
kbqfe kbnetframe100presp3fix kbfix kbbug KB818982

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from