BUG: .NET Method That Takes a ByRef Value Type Parameter Fails When You Pass a Variant Type (317887)
The information in this article applies to:
- Microsoft Windows .NET Framework 1.1
- Microsoft .NET Framework 1.0
- Microsoft .NET Framework Class Libraries 1.0
This article was previously published under Q317887 SYMPTOMS When you pass an unmanaged VARIANT type, a Microsoft Visual Basic .NET method defined to take a ByRef value type formal parameter may fail with a
System.Runtime.InteropServices.COMException (0x800A000D)
exception. CAUSE When the Visual Basic .NET method that takes a ByRef value type formal parameter returns, the new property value is
written by using the set_MyProp property method instead of the let_MyProp property method. The exception is thrown because of a "Type
Mismatch" error when you use the set_MyProp property method of the Component Object Model (COM) VARIANT, where MyProp is the property in use.
RESOLUTION To pass the property to this method, access it in a late-bound fashion. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 9/22/2003 |
---|
Keywords: | kbbug kbCOMInterop kbpending KB317887 |
---|
|