so far I've gotten a DLL that wasn't meant for python to work with it, and types return: I just can't pass it arguments because I'm doing it wrong and I don't quite understand the documentation on how I'm supposed to do things. Basically, the function in the DLL I'm testing is named "iptouint". It takes a c_char_p and returns a c_double.
Here is my code:
nDll = ctypes.WinDLL('ndll.dll') nDllProto = ctypes.WINFUNCTYPE(ctypes.c_double) nDllInit = nDllProto(("dllInit", nDll)) nDllTestProto = ctypes.WINFUNCTYPE(ctypes.c_double,ctypes.c_char_p) nDllTest = nDllTestProto(("iptouint",nDll),((1, "p1",0),(1, "p2",0))) #This is the line that throws the error: print("IP: %s" % nDllTest("12.345.67.890")) ''' It gives me the error: ValueError: paramflags must have the same length as argtypes Im not sure what to do; Ive certainly played around with it to no avail. Help is much appreciated. Thanks. '''