🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual
Article #137

Re: how to get path,file name from shortcut lnk file,help

#137
From: Stephen
Date: Wed, 09 Feb 2000 00:00
27 lines
1898 bytes
Paul Norrish <pnorrish@home.com> wrote in message
news:_Win4.63005$A5.1193600@news1.rdc1.bc.home.com...
> Before opening a file I have to find out its name and location, because in
> some cases the user selects a shortcut file (*.lnk) instead of the data
file
> itself.
>
> When I fire the Open statement with the *.lnk filename I don't get the
> target file opened but the shortcut only.
>
> Is there some kind of "indirect open" statement, solving the shortcut? Or
is
> there an API to solve the shortcut, i.e. with the lnk filename as an
> argument and returning the target filename?
>
> Somewhere I found a format description of "The Windows Shortcut File
Format
> as reverse-engineered by Jesse Hager" which I will use if there is no
easier
> way.

Are you using the Common Dialog Control? If so, IIRC, there is a property
called DereferenceShellLinks which will do this for you.

HTH
Stephen
Technical Details
Message-ID: <qZho4.5953$uc.121653@nnrp4.clara.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <_Win4.63005$A5.1193600@news1.rdc1.bc.home.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 108062,3cba51c967e7c99
X-Google-Attributes: gid108062,public
X-Google-Thread: f5f6f,3cba51c967e7c99
X-Google-Attributes: gidf5f6f,public
X-Google-Thread: 110e3b,3cba51c967e7c99
X-Google-Attributes: gid110e3b,public
X-Google-Thread: f645d,3cba51c967e7c99
X-Google-Attributes: gidf645d,public
From: "Stephen" <stephen@ossar.freeuk.com>
Subject: Re: how to get path,file name from shortcut lnk file,help
Date: 2000/02/09
Message-ID: <qZho4.5953$uc.121653@nnrp4.clara.net>
X-Deja-AN: 583746995
References: <_Win4.63005$A5.1193600@news1.rdc1.bc.home.com>
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@freeuk.net
X-Trace: nnrp4.clara.net 950119382 212.126.150.208 (Wed, 09 Feb 2000 18:03:02 GMT)
NNTP-Posting-Date: Wed, 09 Feb 2000 18:03:02 GMT
Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.3rdparty,comp.lang.basic.visual.misc,cz.comp.lang.basic.visual