收录日期:2020/06/02 19:02:54 时间:2011-04-13 16:13:37 标签:.net,interop,clr

Can a native DLL call a .NET DLL?

No, you need to use managed c++

You need something to make the managed world and the unmanaged world work together. If you don't want to use COM, you can create wrapper classes in C++/CLI.

Here is an article that can get you started: .NET to C++ Bridge.

Without using COM, you have to write a C++/CLI wrapper. Your native code that includes the header file of your wrapper needs to be compiled with /clr (common language runtime support).

Just for curiosity, why not using COM interop? Check out the regasm.exe and tlbexp.exe tools.