C# 使用aruco V3时,由于函数调用,ESP上的DLL导入失败,未正确保存

C# 使用aruco V3时,由于函数调用,ESP上的DLL导入失败,未正确保存,c#,opencv,dll,dllimport,aruco,C#,Opencv,Dll,Dllimport,Aruco,我正试图融入一个团结的项目 因此,我创建了一个.DLL,它作为函数导入,如下所示: private static extern void functionName(uint, uint, float, float,float,float,IntPr,float) 头文件中的函数是: void functionName(unsigned int, unsigned int, float, float, float, float, float const*, float) 我用这个方法调用它:

我正试图融入一个团结的项目

因此,我创建了一个.DLL,它作为函数导入,如下所示:

private static extern void functionName(uint, uint, float, float,float,float,IntPr,float)
头文件中的函数是:

void functionName(unsigned int, unsigned int, float, float, float, float, float const*, float)
我用这个方法调用它:

aruco::Markerdetector 
aruco::Cameraparameters(CalculateCameraMatrix(float, float, float, float), CalculateDistortionCoefficients(float const*), cvSize(uint, uint))
运行应用程序时,opencv.core和opencvimgproc DLL会不断加载和卸载


这是参数转换的问题还是与编译OpenCV时使用的调用约定相关。

可以通过分别向每个dll导入方法添加调用约定来解决问题

 [DllImport("Name", EntryPoint = "EntrypointName", CallingConvention =CallingConvention.Cdecl)]

代码中的缺陷。提供一个文件,并将其格式化,以便我们可以阅读。利用站点帮助。