One more thing, maybe that is the cause, the vr = ctypes.CDLL was called by a different thread then the one using it in the 2nd scenario. Hmm...could this be the problem.

Marcus Low wrote:
I have this shared library that is loaded via  :

vr = ctypes.CDLL("varcfunction.dll")

When i ran it thru main :

if __name__ == "__main__" :
   str = "aaaaa"
   LR = vr.DoIt(str)
   print "results %d" %(LR)

It works perfectly fine and the return result was correct. I could loop it 1000 times without any problem
However when the same code is placed into a thread :

def _test_thread (count, *args) :    str = "aaaaa"
   LR = vr.DoIt(str)
   print "results %d" %(LR)

It bombs out on the first try with :-
WindowsError: exception: access violation reading 0x00000064

Any ideas as to what might be wrong here?




_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32



_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to