View Single Post
Old 12-18-2006, 11:03 PM
Norrit Norrit is offline
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,329
Default RE: Best way to get Windows Temp Directory

And I always use this one:
function TempFolder: String;
  bufFolder: array [0..MAX_PATH] of Char;
  GetTempPath(SizeOf(bufFolder), bufFolder);
  Result := IncludeTrailingPathDelimiter(String(bufFolder));
So you see, it's all a matter of personal flavor...
Only one I wouldn't use is the GetEnvironmentVar, because it goes directly to environment variables... This depends on a variable that I can modify by hand... The GetTempPath method is windows API, so I choose this one...

Objective reality is a delirium caused by lack of alcohol in blood.
There is no place like
Reply With Quote