Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.02.25;
Скачать: CL | DM;

Вниз

Преобразовать путь в полную форму   Найти похожие ветки 

 
Well   (2004-02-13 00:09) [0]

Как преобразовать такой путь в нормальную (полную) форму - "c:\progra~1\myprog~1\testpr~1.exe"?


 
Rouse_ ©   (2004-02-13 00:13) [1]

DWORD GetFullPathName(

LPCTSTR lpFileName, // address of name of file to find path for
DWORD nBufferLength, // size, in characters, of path buffer
LPTSTR lpBuffer, // address of path buffer
LPTSTR *lpFilePart // address of filename in path
);


 
Well   (2004-02-13 00:46) [2]

Что-то это не совсем то, мне кажется.


 
DDA ©   (2004-02-13 01:19) [3]

Я недавно такой же вопрос задавал.

function GetLongFName(FName: String): String;
var
Str2: String;
GetLongPathName: Function (ShortPathName: PChar; LongPathName: PChar;
cchBuffer : Integer): Integer Stdcall;
Handle : THandle;
begin
Result:="";
GetLongPathName:=nil;
SetLength(Str2,256);
Handle:=GetModuleHandle("kernel32.dll");
if Handle = 0 then exit;
@GetLongPathName := GetProcAddress(Handle, "GetLongPathNameA");
if Assigned(GetLongPathName) and (GetLongPathName(PChar(FName),PChar(Str2),256) <> 0)
then Result:=Str2;
end;


Работает,только возвращает строку с нолями на конце строки
Приходиться еще и удалять их


 
Defunct   (2004-02-13 01:43) [4]

Модуль SysUtils

ExpandFileName( FileName );



Страницы: 1 вся ветка

Текущий архив: 2004.02.25;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.049 c
1-79724
smolin
2004-02-12 11:21
2004.02.25
Функция перемещения файла


9-79539
Camedia
2003-08-12 20:06
2004.02.25
Тайлы для игры


14-80286
jack128
2004-02-01 12:48
2004.02.25
Намагничена, поляризована...


6-80066
thevalery
2003-11-27 15:07
2004.02.25
broadcast и две сетевухи


3-79652
Настенька
2004-01-31 11:14
2004.02.25
Разноцветные строки DBGrida