How To Get Windows And System Directory | ||
| ||
| function GetWinDir: String; var dir: array [0..max_path] of char; begin GetWindowsDirectory(dir, max_path); result:=StrPas(dir); end; function GetSysDir: String; var dir: array [0..max_path] of char; begin GetSystemDirectory(dir, max_path); result:=StrPas(dir); end; procedure TForm1.Button1Click(Sender: TObject); begin label1.caption:=GetWinDir; label2.caption:=GetSysDir; end; | ||
| | ||
| |