問題:C# 調(diào)用?CH375OpenDevice 函數(shù)報錯?堆棧不對稱!
相關(guān)代碼:
?if (CH375OpenDevice(i) != INVALID_HANDLE_VALUE)
? {//初始化時檢測是否有已插入的CH372/CH375設(shè)備? ? ? ? ? ? ? ? ? ?
?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#調(diào)用CH375DLL.DLL的相關(guān)Demo?我們現(xiàn)在使用CH32V307單片機。
謝謝!