Главная страница
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.025 c
15-1199834693
Fedor
2008-01-09 02:24
2008.02.17
Постоянная удаленная работа для Delphi программиста, 2-3 ч.в день


2-1201374829
TFileStream
2008-01-26 22:13
2008.02.17
При записи в файл через TFileStream и TWriter в файл попадает мусор


15-1200305796
Stilet
2008-01-14 13:16
2008.02.17
Как проинсталить Perl?


3-1191298911
Memed_1971
2007-10-02 08:21
2008.02.17
calculate string SQL server 20005


8-1173858232
seleman
2007-03-14 10:43
2008.02.17
Bluetooth