本文整理自网络,侵删。
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;
相关阅读 >>
winapi 字符及字符串函数(5): ischaralpha - 是否是个字母
Delphi ini 文件操作记要: 使用 tmeminifile
更多相关阅读请进入《Delphi》频道 >>