This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Retrieving name of executable
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 14 Jan 2005 14:35:28 -0500
- Subject: Re: Retrieving name of executable
- References: <41E811DB.1030800@agilent.com>
- Reply-to: cygwin at cygwin dot com
On Fri, Jan 14, 2005 at 10:39:23AM -0800, Earl Chew wrote:
>I think the name of the current executable is stored in myself->progname
>within cygwin1.dll.
>
>The more easily accessible __progname returns the basename of the
>executable.
>
>Is there a way for an application to obtain myself->program, other
>than resorting to raw win32 call to GetModuleFileName()?
argv[0] or __argv[0] or /proc/self/exename
cgf
--
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/