Article View: borland.public.cppbuilder.nativeapi
Article #5508GetTempPath() and the ugly "~1" How to get the *full path* ??
From: Oren Halvani
Date: Thu, 11 Aug 2005 00:34
Date: Thu, 11 Aug 2005 00:34
29 lines
1594 bytes
1594 bytes
dear builders,
i'm using the below function to retrieve the current temp folder, it
work ok, but i get this result:
"C:\DOKUME~1\Oren\LOKALE~1\Temp\ShowRecord-Tempfile"
BUT it should be:
"C:\Dokumente und Einstellungen\Oren\Lokale
Einstellungen\Temp\ShowRecord-Tempfile"
what do i need to get this full path and get rid of the ugly "~1" ??
Oren
/*******************************************************/
AnsiString TfrmMainUnit::GetTempFile()
{
char TempDir[MAX_PATH + 1]; TempDir[MAX_PATH] = '\0';
GetTempPath(MAX_PATH, TempDir);
String filename = "ShowRecord-Tempfile";
return TempDir + filename;
}
/*******************************************************/
Technical Details
Message-ID:
<42fa9d15@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!ecngs!feeder.ecngs.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,420a348eb6918014,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Oren Halvani" <NoSpam@fdtd.com> From: "Oren Halvani" <NoSpam@fdtd.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: GetTempPath() and the ugly "~1" How to get the *full path* ?? Date: Thu, 11 Aug 2005 02:34:29 +0200 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 84.176.90.53 Message-ID: <42fa9d15@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1123720469 84.176.90.53 (10 Aug 2005 17:34:29 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!ecngs!feeder.ecngs.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail