Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Thu, 7 Dec 2000 02:05:46 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Trouble accessing functions in cygwin1.dll
Message-ID: <20001207020546.C13259@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <010401c06010$3099e870$4c3ca8c0@adacel.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.11i
In-Reply-To: <010401c06010$3099e870$4c3ca8c0@adacel.com.au>; from petert@adacel.com.au on Thu, Dec 07, 2000 at 04:40:21PM +1100

On Thu, Dec 07, 2000 at 04:40:21PM +1100, Peter Tersteeg wrote:
>Hi,
>
>I'm trying to use cygwin in a VC++ project (not pleasant, but I don't have a
>choice) and I'm trying to access several functions using LoadLibrary and
>GetProcAddress.  I've used assertions to check that they are found successfully,
>but at runtime the program crashes when calling any of these functions.
>
>The problem seems to be that I'm calling the functions with invalid parameters,
>but I can't find any info that contradicts the parameters I'm using.  The
>functions and the parameters I'm using are:
>
>pid_t  wait(int *)
>int  fcnt(int, int, ...)
>pid_t  fork(void)
>int  pipe(int __fildes[2])
>int  stat(const char *__path, struct stat *__sbuf)
>
>pid_t is defined as an unsigned int.
>
>If anyone knows if these are okay or not, please let me know.

It's not ok.  The fact that the program crashes should be a mild hint that this
is so.

You can't call cygwin from a VC++ program unless you really really know what
you're doing.  And even then, I'm not too sure.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

