[python-win32] strange crashed on calling loaded shared Library in windows

Marcus Low marcus at internetnowasp.net
Tue Jul 8 06:00:29 CEST 2008


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
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>




More information about the python-win32 mailing list