Thread View: borland.public.cppbuilder.nativeapi
9 messages
9 total messages
Started by Renan
Thu, 26 Oct 2006 16:52
detect software directory
Author: Renan
Date: Thu, 26 Oct 2006 16:52
Date: Thu, 26 Oct 2006 16:52
6 lines
956 bytes
956 bytes
How do I detect the directory of the software I'm running ( I want this software to detect its own directory) How do I get system date? Thanks
Re: detect software directory
Author: Ed Mulroy
Date: Thu, 26 Oct 2006 17:16
Date: Thu, 26 Oct 2006 17:16
18 lines
1371 bytes
1371 bytes
> How do I detect the directory of the software I'm running GetCurrentDirectory > How do I get system date? GetLocalTime GetSystemTime . Ed > Renan wrote in message > news:4540e7c1$1@newsgroups.borland.com... > > How do I detect the directory of the software I'm running ( I want > this software to detect its own directory) > > How do I get system date?
Re: detect software directory
Author: Remy Lebeau (TeamB)
Date: Thu, 26 Oct 2006 18:52
Date: Thu, 26 Oct 2006 18:52
11 lines
1147 bytes
1147 bytes
"Renan" <nospam_dot_gulbrrs@gmail_dot_.com> wrote in message news:4540e7c1$1@newsgroups.borland.com... > How do I detect the directory of the software I'm running > ( I want this software to detect its own directory) Call GetModuleFileName() and then strip off the filename portion. Gambit
Re: detect software directory
Author: Remy Lebeau (TeamB)
Date: Thu, 26 Oct 2006 18:53
Date: Thu, 26 Oct 2006 18:53
13 lines
1295 bytes
1295 bytes
"Ed Mulroy" <dont_email_me@bitbuc.ket> wrote in message news:4540ed72$1@newsgroups.borland.com... > GetCurrentDirectory Why would you recommend that? The current working directory for a process is dynamic (and can even be specified when the process is first started). It is not a very reliable way to get the folder that the application is running in. Gambit
Re: detect software directory
Author: Ed Mulroy
Date: Thu, 26 Oct 2006 19:16
Date: Thu, 26 Oct 2006 19:16
18 lines
1708 bytes
1708 bytes
> Why would you recommend that? Because I understood that to be what he was asking for. As for it being dynamic, that is under program control and he is writing the program. . Ed > Remy Lebeau wrote in message > news:4541047a$3@newsgroups.borland.com... > >> GetCurrentDirectory > > Why would you recommend that? The current working directory > for a process is dynamic (and can even be specified when the > process is first started). It is not a very reliable way to get the > folder that the application is running in.
Re: detect software directory
Author: Bob Gonder
Date: Thu, 26 Oct 2006 19:21
Date: Thu, 26 Oct 2006 19:21
8 lines
1217 bytes
1217 bytes
Ed Mulroy wrote: >> How do I detect the directory of the software I'm running > >GetCurrentDirectory GetModuleFileName might work more often, if he wants the directory of the executable.
Re: detect software directory
Author: Remy Lebeau (TeamB)
Date: Thu, 26 Oct 2006 19:45
Date: Thu, 26 Oct 2006 19:45
15 lines
1506 bytes
1506 bytes
"Ed Mulroy" <dont_email_me@bitbuc.ket> wrote in message news:4541097a$1@newsgroups.borland.com... > As for it being dynamic, that is under program control and > he is writing the program. It may be under program controll, but there are plenty of VCL and Win32 controls that change the working directory at runtime for their own purposes. The working directory is also under user control as well - create a shortcut to the program, and the "Start In" field has direct effect on the initial value that GetCurrentDirectory() returns. Gambit
Re: detect software directory
Author: Roger
Date: Fri, 27 Oct 2006 14:28
Date: Fri, 27 Oct 2006 14:28
9 lines
1261 bytes
1261 bytes
> > How do I detect the directory of the software I'm running ( I want this > software to detect its own directory) > What about: AnsiString asPath = ExtractFilePath(Application->ExeName); Roger
Re: detect software directory
Author: Bruce Larrabee
Date: Sat, 28 Oct 2006 12:45
Date: Sat, 28 Oct 2006 12:45
17 lines
1334 bytes
1334 bytes
Roger wrote: >>How do I detect the directory of the software I'm running ( I want this >>software to detect its own directory) >> > > What about: > > AnsiString asPath = ExtractFilePath(Application->ExeName); > > Roger > > This is what I do. Bruce
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads