Article View: borland.public.cppbuilder.nativeapi
Article #6772Retrieving the Start from directory
From: Marc
Date: Wed, 20 Apr 2005 21:45
Date: Wed, 20 Apr 2005 21:45
26 lines
1922 bytes
1922 bytes
Hi I am having an issue with retrieving the directory from where my application is started from, let me explain... GetModuleFileName and GetCurrentDirectory aren't cutting it for me. GetMod... retruns the location of my exe as expected as for GetCurrentDirectory it works only when I am local on my system. Results from GetCurrentDirectory executions: My actual EXE resides on C:\program files\Somedirectory\Application.exe. 1. From the RUN dialog box GetCurrentDirectory return the location where the EXE resides. 2. I have a batch file located on my desktop from which I execute the same command line as in the run command, in this case I get my desktop folder as expected. 3. Same batch file as the one on my desktop but this time I run it off a shared network path (\\somePC\SomeDirectory\file.bat in this case GetCurrectDirectory return C:\Windows. I have 2 questions, why C:\Windows and how can I have my application return the network path? Thanks for the help. Marc
Technical Details
Message-ID:
<4266bf60@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d14a13f082d61e40,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Marc" <bukwheat_NS@axess.com> Sender: "Marc" <bukwheat_NS@axess.com> Reply-To: "Marc" <bukwheat_NS@axess.com> Subject: Retrieving the Start from directory Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 138.11.254.204 X-Forwarded-For: unknown NNTP-Posting-Host: 207.105.83.66 Message-ID: <4266bf60@newsgroups.borland.com> Date: 20 Apr 2005 13:45:20 -0800 X-Trace: newsgroups.borland.com 1114029920 207.105.83.66 (20 Apr 2005 13:45:20 -0800) Lines: 27 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!tdsnet-transit!newspeer.tds.net!38.119.100.82.MISMATCH!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail