M
Madhu Gopinathan
Hi,
I am facing a problem in .NET COM InterOp. I have a COM Dll which I want to use from my CSharp code. So, I import the TLB directly from the DLL using the tlbimp tool to a managed DLL. I add a reference to this managed DLL in my CSharp solution. Now, when I try to create a new instance of an object inherent in the COM DLL using
MyObject object = new MyObject();
I recieve the error,
An unhandled exception of type 'System.BadImageFormatException' occurred in TestInterOp.exe.
Additional information: Exception from HRESULT: 0x800700C1.
What is the problem here? I have added the managed assembly to the GAC because I don't want to do that.
Regards,
Madhu.
I am facing a problem in .NET COM InterOp. I have a COM Dll which I want to use from my CSharp code. So, I import the TLB directly from the DLL using the tlbimp tool to a managed DLL. I add a reference to this managed DLL in my CSharp solution. Now, when I try to create a new instance of an object inherent in the COM DLL using
MyObject object = new MyObject();
I recieve the error,
An unhandled exception of type 'System.BadImageFormatException' occurred in TestInterOp.exe.
Additional information: Exception from HRESULT: 0x800700C1.
What is the problem here? I have added the managed assembly to the GAC because I don't want to do that.
Regards,
Madhu.