Microsoft C++ exception: _com_error at memory loca

2019-08-09 01:28发布

I have created a COM dll in .Net and build it under Any CPU. I am using that COM dll in Vcpp code but getting Microsoft C++ exception: _com_error at memory location error when creating the pointer reference to COM class. The VCPP code works perfectly fine if the Build configuration is Win32 but if i change the configuration to X64 mode then teh application crashes.

Please Help

标签: com
1条回答
一夜七次
2楼-- · 2019-08-09 02:05

Since you're using a so-called in process DLL, you have to use the 64 bits version of that DLL in your program.

This question discusses it. It seems that you have to use the 64 bit regasm tool to register your .NET DLL.

查看更多
登录 后发表回答