🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual
3 messages
3 total messages Started by Paul Norrish Sun, 06 Feb 2000 00:00
how to get path,file name from shortcut lnk file,help
#134
Author: Paul Norrish
Date: Sun, 06 Feb 2000 00:00
17 lines
1681 bytes
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.

Paul
please email me
Re: how to get path,file name from shortcut lnk file,help
#135
Author: banfield
Date: Mon, 07 Feb 2000 00:00
24 lines
1964 bytes
I recall seeing the answer to this at http://www.mvps.org/vbnet/

Has lots of good stuff.
-Drew

Paul Norrish wrote:
> 
> 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.
> 
> Paul
> please email me
Re: how to get path,file name from shortcut lnk file,help
#137
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads