// 获取Windows目录function GetWindowsPath: String;var S:PChar;begin GetMem(S, MAX_PATH); GetWindowsDirectory(S,MAX_PATH); Result := S; FreeMem(S);end;