Benjamin thanks for replying. i'm not using the python that comes with cygwin. Its the regular python 2.7.2 To add more info I'm opening up a zip file within the DLL. The zip file is located in the same directory. arg1 is the file name arg2 is zip password
Thanks, Sathish On Fri, Jul 22, 2011 at 7:47 AM, Benjamin Kaplan <benjamin.kap...@case.edu>wrote: > On Thu, Jul 21, 2011 at 6:42 PM, Sathish S <sath...@solitontech.com> > wrote: > > 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 ?? > > > > An access violation is what is usually referred to as a seg fault. It > means something isn't getting initialized properly. Are you using a > Cygwin build of Python? Trying to mix Cygwin with normal Windows > programs doesn't usually work very well. > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list