Delphi调用API函数获取Windows目录信息、获取System目录信息、获取Temp临时文件目录信息

var

  Str1, Str2: Array[1..Max_Path]of Char;//开辟缓冲区

  Str3: Array[1..127]of Char;

begin

  GetWindowsDirectory(@Str1, 256);//调用API函数获取Windows目录信息

  GetSystemDirectory(@Str2, 256);//调用API函数获取System目录信息

  GetTempPath(127, @Str3);//调用API函数获取Temp目录信息
end;
View Code

 

posted @ 2019-04-10 14:38  MasterQi  阅读(704)  评论(0编辑  收藏  举报