From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,814d0ec938d6e4da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-25 03:40:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: Thierry Lelegard Newsgroups: comp.lang.ada Subject: Re: How to find directory where the program is? Date: Thu, 25 Apr 2002 12:35:43 +0200 Organization: CANAL+ Technologies Message-ID: <3CC7DBFF.AE672D4D@canal-plus.fr> References: NNTP-Posting-Host: host227.canal-plus.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: s1.read.news.oleane.net 1019730943 22653 194.2.208.227 (25 Apr 2002 10:35:43 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 25 Apr 2002 10:35:43 +0000 (UTC) X-Mailer: Mozilla 4.78 [fr]C-CCK-MCD C+ (WinNT; U) X-Accept-Language: fr,en,zh-CN,zh-TW Xref: archiver1.google.com comp.lang.ada:23100 Date: 2002-04-25T12:35:43+02:00 List-Id: "Grein, Christoph" wrote: > > Observation for Ada.Command_Line.Command_Name: > Win98: Always the full path and extension are returned. > WinNT: Only the name as entered on the command line is returned. Use the Win32 service GetModuleFileName (with a null hadle for hModule). You will get a full path name of your executable file on all Win32 platforms. See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/dll_0ysl.asp Not portable outside windows though... -Thierry ____________________________________________________________________________ Thierry Lelegard, "The Jazzing Troll", CANAL+ Technologies ____________________________________________________________________________