Article View: borland.public.cppbuilder.nativeapi
Article #17425Re: How to get application's directory?
From: Remy Lebeau (TeamB)
Date: Mon, 24 Mar 2003 17:46
Date: Mon, 24 Mar 2003 17:46
33 lines
2742 bytes
2742 bytes
"Rodolfo Frino - Stargate Software" <starcinema@eftel.com> wrote in message news:3e7ee719@newsgroups.borland.com... > However, you mentioned and then posted (on my request) > an example that is completely irrelevant (and that you > wrongly thought it was relevant) It was not irrelvant. It directly proved statements you questioned earlier - the VCL could and was altering the process's current directory at runtime, and I gave two very specific tests that proved that. The only change you made to the project was to call GetCurrentDirectory() once (which even that was not 100% reliable), whereas I was calling it multiple times to show that it was indeed being altered over and over at runtime. > since I can overcome any internal change to the current directory > done within the application via either an *unofficial* or an > *official* start up code. By caching the value once at startup and reusing it instead of retrieving it over and over, of course. That's fine. That was not the point of my sample project, though. > Of course, I cannot overcome an external change There already is a proven and well-known way to overcome that 100% reliably, but you don't seem willing to use it yourself. Using Application->ExeName is always accurate regardless of any startup code used to spawn the process, regardless of any internal or external changes to the process at startup or at runtime. Gambit
Technical Details
Message-ID:
<3e7f426d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e7a7800$1@newsgroups.borland.com> <3e7a8e39@newsgroups.borland.com> <3e7ae7af$1@newsgroups.borland.com> <3e7c7c8c@newsgroups.borland.com> <3e7cc472$1@newsgroups.borland.com> <3e7cd82a@newsgroups.borland.com> <3e7cfd40$1@newsgroups.borland.com> <3e7dba28@newsgroups.borland.com> <3e7e28c5$1@newsgroups.borland.com> <3e7e5a97@newsgroups.borland.com> <3e7e63ae$1@newsgroups.borland.com> <3e7ee719@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,440cb76ba9be739c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-24 09:44:02 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e7a7800$1@newsgroups.borland.com> <3e7a8e39@newsgroups.borland.com> <3e7ae7af$1@newsgroups.borland.com> <3e7c7c8c@newsgroups.borland.com> <3e7cc472$1@newsgroups.borland.com> <3e7cd82a@newsgroups.borland.com> <3e7cfd40$1@newsgroups.borland.com> <3e7dba28@newsgroups.borland.com> <3e7e28c5$1@newsgroups.borland.com> <3e7e5a97@newsgroups.borland.com> <3e7e63ae$1@newsgroups.borland.com> <3e7ee719@newsgroups.borland.com> Subject: Re: How to get application's directory? Date: Mon, 24 Mar 2003 09:46:31 -0800 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3e7f426d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1048527469 207.175.226.26 (24 Mar 2003 09:37:49 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail