ctypes.ArgumentError when calling DLL functions with Python

后端 未结 2 1939
粉色の甜心
粉色の甜心 2020-12-21 14:49

I\'m using ctypes to call functions in a DLL file according to a description file that describe the DLL functions\' parameters and returns. Here is one function in this DLL

2条回答
  •  清酒与你
    2020-12-21 15:33

    I think the problem is in your C++ interface. I think if you change it to Function:BOOL InitNetwork(char * LocalIP,char * ServerIP,int LocalDeviceID);

    your first call (without the keywords) should work but I think you might need to remove the quotes around the last argument (it is an int after all).

提交回复
热议问题