Need to use C # dll to call C ++ dll?

Do I need to create a C # DLL to call the C ++ DLL, or can I call it directly from my C # application?

+3
source share
2 answers

You can call it directly using PInvoke and the attributeDllImport . Assuming, of course, that it has standard C entry points, not C ++ entry points for the compiler.

If you have not talked about C ++ / CLI, in this case you should refer to the .NET DLL in the same way as refer to any other .NET DLL.

+7
source

You can invoke the Win32 navite dll directly from your code using P / Invoke.

http://msdn.microsoft.com/en-us/magazine/cc164123.aspx

+1

Source: https://habr.com/ru/post/1750745/


All Articles