Article View: borland.public.cppbuilder.nativeapi
Article #5852Re: How to know the file location and name of the project
From: Ramy
Date: Mon, 27 Jun 2005 14:53
Date: Mon, 27 Jun 2005 14:53
34 lines
1835 bytes
1835 bytes
"Emmanuel" <emmanuel@erphk.com> wrote:
>I want to write a VCL,which can know the file location and name of the
>project
>and know the file location and name of the Unit File
>
>Is it possible?
>want is the Command to handle this?
>
>Thank you
>Emmanuel
Look at my example, it's finding the path of the project and
then load file from one of it's sub-directories, the command
you need is ExtractFileDir().
TStringList *PalleteData = NULL, *ListOfPalletes = NULL;
ListOfPalletes = new TStringList;
ListOfPalletes->Clear();
FullPathStr = ExtractFileDir( Application->ExeName );
strcpy( FullPath, FullPathStr.c_str() );
strcat( FullPath, "\\Palletes\\PalleteList.dat" );
ListOfPalletes->LoadFromFile ( FullPath );
Line = 0;
for ( Index = 0; Index < ListOfPalletes->Count; Index++ )
strcpy( Str, ListOfPalletes->Strings[Index].c_str() );
if ( ListOfPalletes )
delete ListOfPalletes;
Ramy
Technical Details
Message-ID:
<42c012df$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42bfecd6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,25b34795e49e3050 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ramy" <Ramy@Nomail.com> Sender: "Ramy" <Ramy@Nomail.com> Reply-To: "Ramy" <Ramy@Nomail.com> Subject: Re: How to know the file location and name of the project Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.0.27.159 References: <42bfecd6@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <42c012df$1@newsgroups.borland.com> Date: 27 Jun 2005 07:53:19 -0700 X-Trace: newsgroups.borland.com 1119883999 207.105.83.66 (27 Jun 2005 07:53:19 -0700) Lines: 35 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail