Question #691876 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691876

Vinitha Palanisamy posted a new comment:
Hi Raiman,

Thank you for your time. Actually my problem was solved. Following is
the working code. I have missed the line 'ocrStrBufObj =
ocrStrBufClass(ocrInitStr)' (line 4 in following snippet) previously
which made my code not working.


from ctypes import *

ocrStrBufClass = c_char_p
ocrStrBufSize = 100
ocrInitStr = ' ' * ocrStrBufSize
ocrStrBufObj = ocrStrBufClass(ocrInitStr)

dllPath = "D:\Sikuli\LabVIEWOCR\DLL\LabVIEWOCR.dll"

#void __cdecl PerformOCR(char ReadString[], int32_t len);

mydll = cdll.LoadLibrary(dllPath)
funcPerformOCR = mydll.PerformOCR
funcPerformOCR.argtypes = [c_char_p, c_longlong]
funcPerformOCR.restype = c_void_p
funcPerformOCR(ocrStrBufObj, ocrStrBufSize)
print(ocrStrBufObj.value)


Regards,
Vintiha

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to