简体   繁体   中英

Use C++ dll from C#

I have a C# GUI, and a dll I compiled in matlab for C++. I would like to call from my C# code to the dll functions. I tried first to convert the C# code to CLI, but then saw it is not recommended. Can I create one solution with 2 projects - one the C# GUI and one - wrap the c++ dll with C++ code and call it from the C# ?

Any reference will be appreciated.

Thanks

您可以通过使用[DllImport]属性在C#中使用C ++ dll,此MSDN线程中对此进行了描述。

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