This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: argv[0] has no full path name on winnt
- To: gnu-win32 at cygnus dot com
- Subject: Re: argv[0] has no full path name on winnt
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Date: Mon, 14 Jul 1997 12:52:12 +1000 (EST)
- References: <199707131821.OAA05142@woodmore.gsfc.nasa.gov>
Arlindo da Silva <dasilva@woodmore.gsfc.nasa.gov> writes:
>I have this wrapper application which uses argv[0] to figure out the
>directory where it was been installed, setting up all the other
>necessary enviroment variables before firing up the main
>application.
cygwin32 is a Unix emulation library, and on Unix there is no
guarantee that argv[0] will contain the full path.
So if you want the full path name, you should use the appropriate
Win32 function to get it (as someone else advised), not argv[0].
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".