[Solved] Exporting C++ dll to c# [closed]
[DllImport(@”../data/stasm_dll.dll”)] internal static extern void AsmSearchDll ( [Out] out Int32 pnlandmarks, [Out] out Int32[] landmarks, [In, MarshalAs(UnmanagedType.LPStr)] String image_name, [In, MarshalAs(UnmanagedType.LPStr)] String image_data, [In] Int32 width, [In] Int32 height, [In] Int32 is_color, [In, MarshalAs(UnmanagedType.LPStr)] String conf_file0, [In, MarshalAs(UnmanagedType.LPStr)] String conf_file1 ); IplImage img = cvlib.cvLoadImage(image_name, cvlib.CV_LOAD_IMAGE_COLOR); String imageData = Marshal.PtrToStringAnsi(img.imageData); AsmSearchDll(out nlandmarks, out landmarks, image_name, … Read more