WindowsError: exception: access violation

Sathish S sathish at solitontech.com
Fri Jul 22 03:42:07 CEST 2011


Hi Ppl,

 I have been trying to call a C DLL built in GCC with cygwin and Eclipse IDE
from python. Since this DLL was built using cygwin it had the following two
DLL's as dependency. cygwin1.dll and cyggcc_s-1.dll

I'm calling the cygwin_dll_init method in the cygwin1.dll before accessing
my DLL. When I call one of the methods within my DLL I get the WindowsError:
exception: access violation... error

the functions prototype is like: int function(char *, char *) I'm calling
the function as: DLL = cdll.LoadLibrary (DLL_NAME) print
DLL.function(c_char_p("string1"),c_char_p("string2)")

This error is not consistent with all the stations. I occurs consistently in
many XP machines, while in Windows 7, this occurs once in a while. In Win 7
in starts up a Pythonw.exe process when calling function successfully. I'm
not sure why this error occurs. Any help ??

Thanks,

Sathish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110722/c54a80b4/attachment.html>


More information about the Python-list mailing list