delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/07/13:24:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 7 Feb 2002 13:23:09 -0500
Resent-Message-Id: <200202071823 DOT NAA17100 AT corky DOT voltar-confed DOT org>
Message-Id: <200202071823.NAA17100@corky.voltar-confed.org>
From: Jettero Heller <cygwinuser AT voltar-confed DOT org>
To: Jon Leichter <jonleichter AT mediaone DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: dll
References: <20020207101841 DOT A19683 AT corky DOT voltar-confed DOT org> <CIENIMJIOHKBPJEFFFOBAECJCEAA DOT jonleichter AT mediaone DOT net>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <CIENIMJIOHKBPJEFFFOBAECJCEAA.jonleichter@mediaone.net>; from jonleichter@mediaone.net on Thu, Feb 07, 2002 at 09:16:12AM -0800
Resent-From: jettero AT voltar DOT org
Resent-Date: Thu, 7 Feb 2002 13:23:09 -0500
Resent-To: cygwin AT cygwin DOT com

Well, I doubt it's that, cuz everything works fine...
Arguments, strcpy(), printf(), ...

socket() and open() cause the crash...

Though, just for shits and giggles... how do ya change to
__stdcall instead of __cdecl?

On Thu, Feb 07, 2002 at 09:16:12AM -0800, Jon Leichter wrote:
> I'll take a guess...
> 
> Perhaps when FoxPro uses a DLL, it's similar to when Visual Basic uses one.
> With VB, the functions that you export from your DLL must following the
> standard calling convention __stdcall, opposed to the C calling convention
> __cdecl. If FoxPro is the same, then it's calling your DLL with parameters
> in reverse order, AND it's expecting your function to clean up the stack
> (opposed to it having to do the work).
> 
> I have no idea if I'm right about this, but it's worth a try. Re-export the
> functions from your DLL with __stdcall, and see what that does for you.
> 
> Jon
> 
> > -----Original Message-----
> > From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> > Of Jettero Heller
> > Sent: Thursday, February 07, 2002 7:19 AM
> > To: cygwin AT cygwin DOT com
> > Subject: Re: dll
> >
> > I tried this question a few days ago... no bites.  Is there
> > a better place I can ask about it, or read about DLL's or
> > something.
> >
> > Really, I figure it's a conflict between cygwin1.dll's
> > filehandles and some other DLL that foxpro is loading...
> >
> > Ever heard of file handle issues in any other DLL?
> >
> > On Mon, Feb 04, 2002 at 10:00:02AM -0500, Jettero Heller wrote:
> > >
> > > I'm attempting to write a dll that gives some TCP support to
> > > FoxPro.
> > >
> > > FoxPro is pretty antiquated... it's been challenging. ;)
> > >
> > >
> > > I got to a place where my dll loads up fine from a .exe, but
> > > if foxpro tries to use it, it sagfaults:
> > >
> > > VFP caused an invalid page fault in
> > > module KERNEL32.DLL at 0167:bff7b9a6.
> > >
> > > The line that causes the sagfault appeared to be a harmless
> > > int sfd = socket() call.  *ponder*
> > >
> > > I had done a few other cygwin1.dll calls (sprintf, strcpy,
> > > and so on); and theorized that it had something to do with
> > > the file handle.
> > >
> > >
> > > I did a similar int fd = open() call.  It worked from my
> > > .exe load of the .dll, but crashed with foxpro.
> > >
> > >
> > >
> > > I believe the problem is that foxpro is linked against a
> > > .dll that clashes with the cygwin1.dll ... or something
> > > like that.
> > >
> > >
> > > Any suggestions at all would be greatly appreciated.
> > > --
> > > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > > Bug reporting:         http://cygwin.com/bugs.html
> > > Documentation:         http://cygwin.com/docs.html
> > > FAQ:                   http://cygwin.com/faq/
> > >
> > --
> > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting:         http://cygwin.com/bugs.html
> > Documentation:         http://cygwin.com/docs.html
> > FAQ:                   http://cygwin.com/faq/
> >

-- 
If riding in an airplane is flying, then riding in a boat is swimming.
17 jumps from a c182.  Roughly 142 seconds of free fall.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019