本文整理自网络,侵删。
uses ShellApi, ShlObj, ComObj, ActiveX;
function GetTempDirectory: string;var lpBuffer: array[0..MAX_PATH] of Char;begin GetTempPath(MAX_PATH, @lpBuffer); Result := StrPas(lpBuffer);end;
procedure TForm1.Button1Click(Sender: TObject);beginshowmessage(GetTempDirectory);end;
相关阅读 >>
Delphi 10.3 调试程序时出错:unable to create process:请求的操作需要提升
Delphi xe6开发的android应用实现在线升级完成后自动安装apk代码(加说明)
更多相关阅读请进入《Delphi》频道 >>