delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/14/14:35:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Fri, 14 Jan 2005 14:35:28 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
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
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019