Article View: borland.public.cppbuilder.nativeapi
Article #17594Re: How to get application's directory?
From: Remy Lebeau (TeamB)
Date: Sun, 23 Mar 2003 21:47
Date: Sun, 23 Mar 2003 21:47
21 lines
2048 bytes
2048 bytes
"Jeff Douglass" <.> wrote in message news:3e7e01cb$1@newsgroups.borland.com... > I need to achieve the same result for all my console mode > applications and therefore can not use the TApplication function > mentioned and have to use Win32 api. Internally, TApplication::ExeName simply uses PramStr(0) which in turn calls GetModuleFileName(0). Then you just have to parse the returned path to remove everything after the last baskslash. > Is it therefor safe to assume that ONLY an application (process) > can change change it's current directory. (ie. another application's > call to SetCurrentDirectory() only changes the current directory for > itself and does not have any affect on the current directory for any > other applications (processes). Correct. Gambit
Technical Details
Message-ID:
<3e7e2974$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!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> <3e7dbc71@newsgroups.borland.com> <3e7e01cb$1@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-23 23:09:45 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> <3e7dbc71@newsgroups.borland.com> <3e7e01cb$1@newsgroups.borland.com> Subject: Re: How to get application's directory? Date: Sun, 23 Mar 2003 13:47:57 -0800 Lines: 23 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: <3e7e2974$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1048455540 207.175.226.26 (23 Mar 2003 13:39:00 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail