Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010606110714.0163a208@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Wed, 06 Jun 2001 11:12:21 -0400 To: Jesper Eskilson , From: "Larry Hall (RFK Partners, Inc)" Subject: Re: Accessing Cygwin API calls from a native Windows app In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 06:08 AM 6/6/2001, Jesper Eskilson wrote: >Hi! > >Is it at all possible to call a Cygwin API function from a native Windows >application? I know that you can't simultaneously link with MSVCRT and >cygwin1.dll at the same time, but I was think rather along the lines of >calling LoadLibrary() on cygwin1.dll and then doing GetProcAddress() on >the API entry point. > >I managed to get as far as successfully calling GetProcAddres(), but when >calling the function in question (cygwin_conv_to_win32_path, just for >starters), the program crashed. Something is probably not initialized >correctly. > >The reason I'm trying to do this is that I'm trying to get a native >windows application to interoperate smoothly with a Cygwin environment (if >one exists, of course). One important aspect of this is the ability of >understanding Cygwin-style links and mount points. > >Any thoughts? > >[please cc me on any reply, since I am not a subscriber to the list] > >/Jesper Hm, this is harder than you might think. You should look in the email archives for further discussion. You realize, of course, that cygpath can provide you information about mount points, right? Invoking external processes like this to find the information you want is probably an easier way to get at some limited functionality. But don't let me stop you from playing around with linking directly! ;-) Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple