C#調用C++的dll兩種方法(託管與非託管)

C#調用C++的方式分爲兩種:(1)非託管的方式進行調用;(2)採用託管的方式進行調用。 一、使用非託管類調用C++的dll。 1、首先在vs2010新建項目選擇win32應用程序,並設置爲DLL,如下圖所示 5、在dllConsoleApplication1項目上新建一個CPPDLL類,編寫以下代碼: usingSystem; usingSystem.Collections.Generic; u
相關文章
相關標籤/搜索