Главная страница
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.018 c
2-1201272521
erroremaerr
2008-01-25 17:48
2008.02.17
Всем с днем студента :)


15-1200427617
Real
2008-01-15 23:06
2008.02.17
Symantec11 и Daemon Tools


3-1191490877
Ega23
2007-10-04 13:41
2008.02.17
TDataLink - распознать Insert и Edit


2-1201302467
altatr
2008-01-26 02:07
2008.02.17
Memo - запись в одну строку


15-1200660668
Bless
2008-01-18 15:51
2008.02.17
Почему "тренЕр", но "тренИровка"