Delphi 的一些函数(Windows相关)

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

原文地址:https://www.cnblogs.com/brightsea/p/2082416.html