得到一个临时的文件名称(使用GetTempFileName API函数)
2024-08-23 13:05:18
function GetExePath: string;
begin
Result := ExtractFilePath(ParamStr());
end; function GetTempFileName: string;
var
vPath: string;
begin
SetLength(Result, );
GetTempFileName(PChar(GetExePath), PChar('~'), , PChar(result)); vPath := GetExePath + 'temp\';
if not SysUtils.DirectoryExists(vPath) then
SysUtils.ForceDirectories(vPath);
result := PChar(Result); //去掉多余的空字符
Result := vPath + ExtractFileName(Result);
end;
http://blog.csdn.net/shuaihj/article/details/7108792
最新文章
- Atitit 图像处理--图像分类 模式识别 肤色检测识别原理 与attilax的实践总结
- 【python cookbook】【字符串与文本】6.以不区分大小写的方式对文本做查找和替换
- 【转】eclipse下使用hibernate tools实现hibernate逆向工程
- 客户端发包 GS端接收
- Xcode use Protocol buffer
- cocos2d-x关于CCTableView的“乱序问题”的理解
- GitHub使用(四) - 关于分支Branch
- 【JDK1.8】JDK1.8集合源码阅读——LinkedHashMap
- SpringMVC中的适配器(适配者模式)
- 解决redis connection refused: connect无法连接redis
- Windows安装docker (带安装包)
- 51nod1229 序列求和 V2
- Sql Server数据库之存储过程
- maven 项目快速下载jar方式
- python操作三大主流数据库(14)python操作redis之新闻项目实战②新闻数据的展示及修改、删除操作
- ios证书生成
- JavaScript——AJAX
- [Android] 仿照 Last App Switcher 写的小程序
- Python之括号()[]{}
- 关于";XML 文档(2, 2)中有错误:不应有 <;xml xmlns=&#39;&#39;>;";错误