I'm trying to use a DLL that I have used many times in other languages including C, Java, Perl, etc so I am pretty familiar with the library, but I didn't write it. It came from a comercial source.
I'm using ctyps to load the library as such:
from ctypes import * piapi = windll.piapi32 findpoint = piapi.pipt_findpoint findpoint findpoint.restype = c_int findpoint.argtypes = [c_char_p, c_int] ptid =  ptid.append(c_int()) retVal = c_int() tag = create_string_buffer('\000' * 32) ptid = 0 tag.value = str(input("Enter a tag name:")) retVal = piapi.pipt_findpoint(tag, ptid)
I have tried a number of different combinations on the arguments but all of them return a value of 2. The function should return 0 if successful, > 0 if the problem is with the data source and > 0 if the problem is a system problem.
So what system problem is "2"? Is there a listing of error codes to error messages in Python?
PS here's the header entry for the function:
PIINT32 pipt_findpoint( char PIPTR *tagname, int32 PIPTR *pt );