delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/26/17:10:20

X-Spam-Check-By: sourceware.org
X-BigFish: V
MIME-Version: 1.0
Subject: RE: Loading cygwin1.dll from a windows app
Date: Mon, 26 Mar 2007 18:00:42 -0400
Message-ID: <CA77FC40E7A2D24695CF3C790BB73185BC94FA@DOVMS10001.goss.gossinternational.com>
In-Reply-To: A<op.tpspvmdslo37ie@nw17.napa.fi>
From: "Long, Phillip GOSS" <Phillip DOT Long AT gossinternational DOT com>
To: <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l2QMA8EG006541

Antti Karanta wrote:
>   I am trying to load the cygwin1.dll from a windows c app

Why?

>   I am trying to load cygwin1.dll to invoke the cygwin path conver-
> sion functions (to make my program easier to use from cygwin shell).
> I do this to convert the command line params denoting paths or
> files to windows format that the java virtual machine I am launching
> expects.  The jvm is also the reason why I can't compile my app as
> cygwin app - the java jni (java native interface) headers contain 
> windows specific stuff that makes gcc fail, unless -mno-cygwin is
> used. BTW, now that Java  

Basically, I am a lazy programmer, taking the path of least resis-
tance.  If U're running this from bash (what most folks mean by 'the
Cygwin shell'), use command replacement and cygpath, and U don't have
to mess around with a DLL:
~/> groovy $(cygpath -w /path/to/file/in/question/y.xml)

Cygpath with the -w qualifier will convert Cygwin paths to Windows
paths, and U can avoid all the DLL messiness.  This all happens at 
launch, correct?  Launching another process, although it takes time,
is most easliy hidden from the end user at process launch; it's when
U can afford the delay most.  It's at least worth a try.
 
--------------------------------------------------------

Goss ... Innovation for Business

NOTICE: This e-mail and any attachment(s) may contain confidential and proprietary information of Goss International Corporation and/or its subsidiaries and may be legally privileged. This e-mail is intended solely for the addressee. If you are not the addressee, dissemination, copying or other use of this e-mail or any of its content is strictly prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail and any copies. All liability for viruses is excluded to the fullest extent permitted by law. Any views expressed in this message are those of the individual sender. No contract may be construed by this e-mail.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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