简体   繁体   中英

Can a DLL call a .NET DLL?

本机DLL可以调用.NET DLL吗?

不,您需要使用托管c ++

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM