procedure GetWindowsTmpPath(var windowsTmpPath:string);
var
s:array[0..255] of char;
begin
Gettemppath(sizeof(s),s);
windowstmpPath:=s;
end;

解决方案 »

  1.   

    是IE的临时文件夹,还是Windows的
      

  2.   

    procedure  GetWindowsTmpPath(var  windowsTmpPath:string);
    var
      s:array[0..255]  of  char;
    begin
      Gettemppath(256,@s);
      windowstmpPath:=s;
    end;
      

  3.   

    其函数原形为:DWORD GetTempPath(DWORD nBufferLength, LPTSTR lpBuffer);下面的例子示范如何使用:function GetTempDirectory: String;varTempDir: array[0..255] of Char;beginGetTempPath(255, @TempDir);Result := StrPas(TempDir);end;
    备注:临时目录的确定原则:1,如果有TMP环境变量则临时目录为TMP指定的目录2,如果没有TMP环境变量而有TEMP环境变量,则为TEMP变量指定的目录3,如果TMP和TEMP都没有定义,则取当前目录为临时目录
      

  4.   

    谢谢大家!我的要的是完全路径不是8.3形式的!
    如:D:\Documents and Settings\Administrator
    不是D:\Docume~1\Admini~1 这一种
      

  5.   

    这是一个Win32 API函数,自己看一下帮助。