本文整理自网络,侵删。
单元文件:FileCtrl, ShlObj
showmessage(LocalAppDataPath_);
function LocalAppDataPath_: string;
const
SHGFP_TYPE_CURRENT = 0;
var
path: array [0 .. MaxChar] of char;
begin
SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, SHGFP_TYPE_CURRENT, @path[0]);
Result := StrPas(path);
end;
相关阅读 >>
python4Delphi 示例应用程序在 Delphi 应用程序中运行简单的 python 脚本
Delphi 自动把combobox控件的内容里没有的内容加入列表中
Delphi 二进制值转换十六进制 bintohex和hextobin
更多相关阅读请进入《Delphi》频道 >>