Return to Snippet

Revision: 29643
at August 2, 2010 18:01 by icebob


Initial Code
function GetTempFile: TFileName;
// Creates a temporal file and returns its path name
var
  TempFileName: array [0..MAX_PATH-1] of char;
begin
  if GetTempFileName(PChar(GetTempDirectory), '~', 0, TempFileName) = 0 then
    raise Exception.Create(SysErrorMessage(GetLastError));
  Result := TempFileName;
end;

Initial URL

                                

Initial Description

                                

Initial Title
Creates a temporal file and returns its path name

Initial Tags

                                

Initial Language
Delphi