Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 14 Jan 2005 14:35:28 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Retrieving name of executable Message-ID: <20050114193528.GA8109@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <41E811DB DOT 1030800 AT agilent DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41E811DB.1030800@agilent.com> User-Agent: Mutt/1.4.1i 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/