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

前端 未结 2 1884
终归单人心
终归单人心 2021-01-14 12:38

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

相关标签:
2条回答
  • 2021-01-14 13:08

    You can call it directly with PInvoke and the DllImport attribute. Assuming, of course, that it has standard C entry points, not compiler-specific C++ entry points.

    Unless you were talking about C++/CLI, in which case you would reference the .NET DLL exactly as you would reference any other .NET DLL.

    0 讨论(0)
  • 2021-01-14 13:18

    You can call a Win32 navite dll directly from your code using P/Invoke.

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

    0 讨论(0)
提交回复
热议问题