/取得系统System目录<br>var SystemDir:String;<br>begin<br>SetLength(SystemDir,144);<br>if GetSystemDirectory(Pchar(SystemDir),144)<>0 then<br>begin<br>SetLength(SystemDir,StrLen(Pchar(SystemDir)));<br>end;<br>end;<br><br>//取得当前目录<br>var CurrentDir:String;<br>begin<br>SetLength(CurrentDir,144);<br>if GetCurrentDirectory(144,Pchar(CurrentDir))<>0 then<br>begin<br>SetLength(CurrentDir,StrLen(Pchar(CurrentDir)));<br>end;<br>end;