Microsoft KB Archive/833554

= FIX: You may receive an access violation error message when you compile a Visual Basic .NET 2003 project that passes a user-defined type as a variant to a COM+ component =

Article ID: 833554

Article Last Modified on 11/16/2004

-

APPLIES TO


 * Microsoft COM+ 1.0

-





SYMPTOMS
In Microsoft Visual Basic .NET 2003, if you pass a user-defined type by reference from a routine in a Microsoft COM+ component that is in a project, you may receive an access violation error message when you compile the project.



CAUSE
This behavior occurs when a user-defined type is stored by value in a variant and then the variant is passed by reference to an InProcess Microsoft Component Object Model (COM) component. When the routine returns and the reference to the variant is freed, the ByValue user-defined type is also freed. Subsequent calls to the user-defined type will throw an access violation exception because it was incorrectly freed.



How to obtain the hotfix
This issue is fixed in the Microsoft Windows 2000 COM+ 1.0 Hotfix Package 30. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

840999 Availability of Windows 2000 Post-Service Pack 4 COM+ 1.0 Hotfix Rollup Package 30



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

