InterOp interfaces must match Vtable layout for early binding to work (327116)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Basic 2005 Express Edition
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
This article was previously published under Q327116 SYMPTOMS When you call a COM method through InterOp, you may receive
the following error message: An unhandled exception of
type System.Exception occurred in
ApplicationName.exe
Additional
information: Object reference not set to an instance of an object. CAUSE This problem may occur when the order of the methods
declaration in the InterOp interface does not match the order of the Vtable
layout of the COM interface (which is determined by their layout in IDL).
Because you perform early binding in most cases, the order of the methods is
very important in this scenario. RESOLUTION Change the order of the methods declaration in the InterOp
interface to verify that it matches the Vtable layout of the COM interface that
you want to use. STATUSThis behavior is by
design.
Modification Type: | Major | Last Reviewed: | 2/1/2006 |
---|
Keywords: | kbvs2005applies kbvs2005swept kbCOMInterop kberrmsg kbpending kbprb KB327116 |
---|
|