Article View: borland.public.cppbuilder.nativeapi
Article #17614Re: How to get application's directory?
From: Jeff Douglass
Date: Sun, 23 Mar 2003 18:42
Date: Sun, 23 Mar 2003 18:42
17 lines
2182 bytes
2182 bytes
Thanks all. Now for a twist. All answers were great and implemented for my vcl based app. Works great. However, 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. The API documentation states that each application has its own current directory value which is the directory in which the active application is started unless it is explicitly changed , I assume via SetCurrentDirectory(). Futhermore It states that SetCurrentDirectory changes the current directory for the current process. 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). Thanks for any further info on this. Jeff
Technical Details
Message-ID:
<3e7e01cb$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!logbridge.uoregon.edu!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>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 00:12:29 PST From: "Jeff Douglass" <.> 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> Subject: Re: How to get application's directory? Date: Sun, 23 Mar 2003 11:42:42 -0700 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 NNTP-Posting-Host: 68.2.177.21 Message-ID: <3e7e01cb$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1048445387 68.2.177.21 (23 Mar 2003 10:49:47 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!logbridge.uoregon.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail