InterOp interfaces must match Vtable layout for early binding to work
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.
Resolution
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.
