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

Вниз

Получить путь к объекту из ярлыка (lnk)   Найти похожие ветки 

 
IC+   (2008-01-24 16:29) [0]

СОбственно сабж. Помогите новичку. Сильно не пинайте плизз


 
Cj ©   (2008-01-24 16:34) [1]

смотри в сторону IShellLink вродебы...непомню точно...


 
Bujhm   (2008-01-25 11:15) [2]

http://read.excode.ru/art5206p1.html


 
Нафаня   (2008-01-25 12:22) [3]


function GetLnkObjectPath(const LnkFile: string): string;
const
 ValidChars: set of Char = [ #32, #33, #35..#41, #43..#46, #48..#59,
   #61, #64..#123, #125, #126, #160, #192..#255];
var
 hLnk: THandle;
 I: Integer;
 Buffer: array of Char;
 BuffLen: Integer;
 BytesCount: Cardinal;
begin
 Result := "";
 hLnk := CreateFile(PChar(LnkFile), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0);
 if hLnk = INVALID_HANDLE_VALUE then
   Exit;
 BuffLen := GetFileSize(hLnk, nil);
 if BuffLen > 0 then
 begin
   SetLength(Buffer, BuffLen);
   I := 0;
   while (ReadFile(hLnk, Buffer[I], 1, BytesCount, nil)) and (BytesCount > 0) do
   begin
     if Buffer[I] in ValidChars then
       Result := Result + Buffer[I]
     else if FileExists(Result) then
       Break
     else
       Result := "";    
     Inc(I);    
   end;
   Finalize(Buffer);
 end;          
 CloseHandle(hLnk);
end;



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

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

Наверх




Память: 0.47 MB
Время: 0.02 c
15-1200041562
ZoldBerger
2008-01-11 11:52
2008.02.17
Написал программу DelphiDecompiler


15-1200305773
AntiUser
2008-01-14 13:16
2008.02.17
Oracle.


2-1200997632
Gasper
2008-01-22 13:27
2008.02.17
Киррилица


15-1200452599
Slider007
2008-01-16 06:03
2008.02.17
С днем рождения ! 16 января 2008 среда


2-1200930778
Azize
2008-01-21 18:52
2008.02.17
TMemo