Have a look at IShellLink.


        ShellLink := CreateComObject(CLSID_ShellLink) as IShellLink;
      PersistFile := ShellLink as IPersistFile;
      OleCheck(PersistFile.Load(PWideChar('MyLink.lnk'), STGM_READ));

You can then get all the information about the link including path.


-----Original Message-----
From: Nello Sestini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 30 August 2000 9:31
To: Multiple recipients of list delphi
Subject: [DUG]: dereferencing shortcuts


Does anyone have a straightforward way of
dereferencing a "desktop shortcut"?    I mean
those ".lnk" files that point to other files
or folders.

Put another way - given a shortcut foo.lnk
that points to some file bar.txt I'd like
a way to get the fully qualified path
for bar.txt.

Everything I've seen so far seems unbelievably 
complicated.

thanks

ns

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

------------------------------------------------------------------------------
This message and any attachment is confidential and may be privileged or otherwise 
protected from disclosure.  If you have received it by mistake please let us know by 
reply and then delete it from your system; you should not copy the message or disclose 
its contents to anyone.




---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to