什么函数可以在windows下取出dos格式的目录名称? 在windows下是C:\Documents and Settings\Administrator\怎么得到对应的C:\Docume~1\ADMINI~1\?用什么方法或者什么函数能做到? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用Windows API函数,C 原型为DWORD GetShortPathName( LPCTSTR lpszLongPath, LPTSTR lpszShortPath, DWORD cchBuffer);---------在Delphi中这样写var szSDir: array [0..1024] of char; ii: Integer;str2 : string;begin ii := SizeOf(szSDir); GetShortPathName(PChar(LongDirName), szSDir, ii); str2 := StrPas(szSDir);str2即为所要的DOS目录还有,记得Uses Windows 单元 如何读项目代码 Sql2000數據庫的可用空間大小問題 菜鸟问问题,在线等 有关access数据库的bmp图片的读取问题 请问exit和abort有什么区别? 怎么知道另一个程序开始和结束? 各位朋友救命:调用vc dll返回参数的时候出问题。 怎么样用delphi建立精确计数器 关于Application.MessageBox的问题? 初学Delphi要怎么开始呢?望各位高手赐教! 团队创业 NTDLL.DLL文件是作什么用的?
C 原型为DWORD GetShortPathName(
LPCTSTR lpszLongPath,
LPTSTR lpszShortPath,
DWORD cchBuffer
);
---------
在Delphi中这样写var
szSDir: array [0..1024] of char;
ii: Integer;
str2 : string;
begin
ii := SizeOf(szSDir);
GetShortPathName(PChar(LongDirName), szSDir, ii);
str2 := StrPas(szSDir);
str2即为所要的DOS目录
还有,记得Uses Windows 单元