Yea, gotta handle on that one; I use it for my freeware software to clear
out the temporary directory of junk on startup HEREYAGO:


function TAnybodiesForm.GetTheTempDIR: string;
var Tmp: array[0..255] of char;
  Ret: string;
begin
  if GetTempPath(255, Tmp) <> 0 then
  begin
    Ret := StrPas(Tmp);
    if Ret[length(Ret)] = '\' then
      Ret := copy(Ret, 1, length(Ret) - 1);
    result := string(Ret) + '\';
  end
  else
  begin
    Result := '';
  end;
end;

>   There must be an API call which returns de path to the Windows Temp
> directory (e.g "c:\Temp" on WinNT and "c:\Windows\Temp" on Win95/98).
> Does anyone know which is it (or could/should be)?

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to