在C#調用C++的DLL (1)非託管的方式進行調用;(2)採用託管的方式進行調用。

C#調用C++的方式分爲兩種: 一、使用非託管類調用C++的dll。 1、首先在vs2010新建項目選擇win32應用程序,並設置爲DLL,如下圖所示   2、添加MyDLL.cpp源文件,其中代碼: #include <cv.h> #include <highgui.h> extern "C" _ _declspec(dllexport)void Show()   {   IplImage *
相關文章
相關標籤/搜索