[Lazarus] GetTempDir return impartial path

silvioprog silvioprog at gmail.com
Wed Jun 15 22:00:56 CEST 2011


Thanks to all. o/

Solved:

function GetTempDirectory: String;
{$IFDEF MSWINDOWS}
var
  VTempFolder: array[0..MAX_PATH] of Char;
{$ENDIF}
begin
{$IFDEF UNIX}
  Result := GetTempDir;
{$ENDIF}
{$IFDEF MSWINDOWS}
  GetTempPath(MAX_PATH, @VTempFolder);
  Result := StrPas(VTempFolder);
{$ENDIF}
end;

-- 
Silvio Clécio
===============================================
Blog - <silvioprog.com.br>
Twitter - <twitter.com/silvioprog>
LazSolutions - <code.google.com/p/lazsolutions>
Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR>
===============================================
   * Conheça nosso canal IRC sobre Lazarus: #lazarus-br *
===============================================


More information about the Lazarus mailing list