问题:C# 调用 CH375OpenDevice 函数报错 堆栈不对称!
相关代码:
if (CH375OpenDevice(i) != INVALID_HANDLE_VALUE)
{//初始化时检测是否有已插入的CH372/CH375设备
return HID_RETURN.DEVICE_OPENED;
CH375CloseDevice(i);
}
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
[DllImport("CH375DLL.DLL", EntryPoint = "CH375CloseDevice", CallingConvention = CallingConvention.Cdecl)]
public static extern void CH375CloseDevice(ulong iIndex);
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
[DllImport("CH375DLL.DLL", EntryPoint = "CH375OpenDevice", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr CH375OpenDevice(ulong iIndex);
2.有没有c#调用CH375DLL.DLL的相关Demo?我们现在使用CH32V307单片机。
谢谢!