You receive an exception error message when you pass a VARIANT parameter by reference to an MFC automation server (814432)



The information in this article applies to:

  • Microsoft Visual Studio, Enterprise Edition 6.0

SYMPTOMS

If you pass a VARIANT parameter by reference from managed code to a Microsoft Foundation Classes (MFC) automation server, you may receive the following error message:
An exception 'System.Runtime.InteropServices.COMException' has occurred.

CAUSE

This problem occurs because the System.Type.InvokeMember method passes parameters only by value to COM methods. This is the default behavior.

For example, if you pass the VARIANT parameter by reference, as in the following sample code, an exception error occurs:
HRESULT _stdcall Method1(
	                [in, out] VARIANT* inoutVal, 
	                [out] VARIANT* outVal, 
	                [out, retval] VARIANT* retVal);

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, 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 hotfix 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
   ----------------------------------------------------------------------------------------
   01-May-2003  12:37                   47,837  M814432.jcp
   01-May-2003  12:37                   89,221  M814432.log
   01-May-2003  12:37                   11,264  M814432.pcp
   01-May-2003  12:37                    7,168  M814432u.pcp
   01-May-2003  12:37                7,188,992  Ndp10_qfem_q814432_en.msp
   01-May-2003  12:37                3,701,760  Ndp10_qfem_q814432_enu.msp
   07-Aug-2003  15:34                    2,511  Vs_1.0.9675.1229_ndp1.0_qfe_merged_1326.ssi
   01-May-2003  12:36  1.0.3705.410    196,608  Aspnet_isapi.dll
   01-May-2003  12:36                    4,169  Aspnet_perf.h
   01-May-2003  12:36                  513,302  Aspnet_perf.ini
   01-May-2003  12:36                  510,714  Aspnet_perf2.ini
   01-May-2003  12:36  1.0.3705.410     24,576  Aspnet_regiis.exe
   01-May-2003  12:36  1.0.3705.410     28,672  Aspnet_wp.exe
   01-May-2003  12:36  1.0.3705.410     69,632  Corperfmonext.dll
   01-May-2003  12:36  1.0.3705.410    303,104  Mscorjit.dll
   01-May-2003  12:36  1.0.3705.410  1,953,792  Mscorlib.dll
   01-May-2003  12:36                   10,284  Mscorlib.ldo
   01-May-2003  12:36  1.0.3705.410  2,269,184  Mscorsvr.dll
   01-May-2003  12:36  1.0.3705.410  2,269,184  Mscorwks.dll
   01-May-2003  12:36                       15  Smartnav.htm
   01-May-2003  12:36                    8,728  Smartnav.js
   01-May-2003  12:36  1.0.3705.410  1,191,936  System.web.dll
   07-Aug-2003  00:38                      495  Rad3f48e.tmp
   24-Jun-2003  15:31                    1,229  Rad6320e.tmp

STATUS

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

MORE INFORMATION

For additional information about the terminology that is used to describe Microsoft product updates, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Modification Type:MinorLast Reviewed:10/18/2005
Keywords:kbQFE kberrmsg kbfix kbbug KB814432 kbAudDeveloper