Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
Subject: Re: Using cygwin from win32 (MS VC) app
References: <a9e20v$m01$1@main.gmane.org>
From: Jesper Eskilson <jojo@virtutech.se>
Organization: Virtutech AB
Date: 15 Apr 2002 11:42:50 +0200
In-Reply-To: <a9e20v$m01$1@main.gmane.org> ("Kristopher Buschelman"'s message of "Mon, 15 Apr 2002 01:11:29 -0700")
Message-ID: <u67r8lhti05.fsf@sebastian.uppsala.vtech>
Lines: 26
User-Agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

"Kristopher Buschelman" <kbuschelman@attbi.com> writes:

> Then, from the MS-VisualStudio c language code, I make DYNAMIC calls to the
> wrapper routine via GetProcAddress....  It works fine, but making the
> wrapper is a bit less than desirable, not because of the dynamic call --
> which I want anyway.
> 
> When I try to make the dynamic call directly to cygwin1.dll (cygwin
> 1.3.10-1), I get a memory access violation -- memory could not be read.

I tried doing the same, but never managed to figure out how to initialize
the DLL in the right fashion.

I resorted to parsing the output from popen("cygpath -w ..."). Not as
elegant, but much simpler.

> My question is, is there something "obvious" I have missed?  Why can I not
> do this directly on cygwin1.dll?  What happens behind the scenes to make the
> wrapper approach work, while the direct dynamic call fails?  Will there be a
> cygwinapi.dll (pick your favorite name) which can be linked to dynamically
> without additional setup like my wrapper dll?

Probably not unless someone wants it bad enough to write it. I don't.

-- 
/Jesper


--
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/

