C# calls C++ dll

Project programming experience
c# call dll Create a new c++ dll file Run the bin->debug folder to find the dll file, copy it into the c drive Windows "system32 folder, copy into the c# bin" debug folder
C# interface reference halconnet
c# write Two lines [DllImport("grayimagepro.dll")]
unsafe
public static extern MIplImage* gray_proc(IntPtr source, int height, int width);
[DllImport("height_dll.dll")]
public static extern void run2(IntPtr source, int m, int width, int leftpoint, int rightpoint,double[] Height_info);

If there is a problem with c++ running link, select the project > properties > linker > system and change the window to the console

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325855436&siteId=291194637