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 内存加载并运行exe程序

Delphi android adb usb上读取设备信息

Delphi监视进程并结束进程

Delphi shellexecute调用系统命令关闭计算机

Delphi安卓动态切换本地主题

Delphi xe5 for android ttabcontrol 控件

Delphi 3句话绕过xxx拦截删除桌面快捷方式

Delphi 在rxrichedit中插入图片的完美解决方法

Delphi简单读取网上的文本文件

文件占坑对付云安全

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



打赏

取消

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

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

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

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

评论

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