我正在尝试使用 ctypes 调用 dll 函数并出现错误。如何获得有关我的电话有什么问题的更多信息?
dll函数头:
DLL_API BOOL WINAPI DDSSetFrequency(int index, double frequency, int* wavePointNum, int* TNum);
蟒蛇代码
from ctypes import *
hantek = cdll.LoadLibrary("E:\Programmer's Guide\DLL\DDS3X25Dll.dll")
print hantek.DDSSearch()
wavePointNum = c_int()
Tnum = c_int()
frequency = c_double(10000000.0)
index = c_int32(1)
hantek.DDSSetFrequency(index,frequency,byref(wavePointNum),byref(Tnum))
1
Traceback (most recent call last):
File "3x25.py", line 17, in <module>
hantek.DDSSetFrequency(index,frequency,byref(wavePointNum),byref(Tnum))
ValueError: Procedure called with not enough arguments (20 bytes missing) or wro
ng calling convention