delphi转换长文件名函数 GetShortName


本文整理自网络,侵删。

 //-----------------------------------------------------------  function  GetShortName(sLongName:  string):  string;  //转换长文件名  var  sShortName:  string;  nShortNameLen:  integer;  begin  SetLength(sShortName,  MAX_PATH);  nShortNameLen  :=  GetShortPathName(PChar(sLongName),  PChar(sShortName),  MAX_PATH  -  1);  if  (0  =  nShortNameLen)  then  begin  //  handle  errors...  end;  SetLength(sShortName,  nShortNameLen);  Result  :=  sShortName;  end;   

相关阅读 >>

Delphi toscilloscope 仿windows任务管理器cpu使用记录组件

Delphi 数字转换成中文

Delphi makeuniquefilename 创建文件名如果已经存在自动更改文件名

Delphi指针

Delphi 下保存真彩彩图标的方法实例

Delphi android调用授权管理打开通知监听服务

Delphi服务器端如何防止ddos

Delphi获取文件创建时间、文件最后修改时间

Delphi使用sqlite数据库时的中文路径问题

Delphi串口通信编程

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...