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实现tedit控件的外观只有一条下划线

Delphi xe sha1

Delphi isdirectory 判断是否是目录

Delphi x 的 y 次方

Delphi xe 控件字体加粗变色居中等

Delphi 官方使用并行编程库介绍

Delphi分离汉字和英文字母

Delphi 过滤开头 结尾 全部 空格的函数

Delphi ioutils单元查找文件夹下所有文件

Delphi xe5 android平台 调用 webservice

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



打赏

取消

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

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

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

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

评论

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