I am trying to get a response from a dll library in python using the ctypes wrapper. The response of the function should return x and y coordinates as c_short. A relevant snippet of my code is as follows:
ethdll = ctypes.cdll.LoadLibrary('C:\\Users\\jgallacher\\Documents\\Software_Drivers\\RTC4eth V2 Software Release 2021-06-25\\DLL\\RTC4ethDLLx64.dll')
def get_xy_pos(ethdll):
x = ctypes.c_short()
y = ctypes.c_short()
res = ethdll.get_xy_pos(ctypes.byref(x), ctypes.byref(y))
print(res)
However, when I try this definition I get a Nonetype(0) as the return. Can anyone suggest what is wrong with my function call? I've attached the
I've attached a picture showing the response type to this question thread.
Thanks!
Jordan.