🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by const * const char ME Wed, 02 Jan 2008 21:38
Is it possible to get the shortcut link file used to launch an application?
#867
Author: const * const char ME
Date: Wed, 02 Jan 2008 21:38
13 lines
1622 bytes
From within a target applications code, is it possible to get the shortcut 
link file used to launch the application?  Assuming of course we do not pass 
any added parameters from each link to differentiate them...  This seems 
like the obvious solution - but I want to avoid that if possible.

I need to determine the shortcut link file used to launch my application. 
EG: c:abc\target.exe  and two shortcut links, once on the desktop and one in 
the start menu, I need to be able to inside target.exe figure out which link 
was used or if it was launched directly from inside Windows explorer... 
Again - without passing parameters from each link to differentiate them....


TIA.
Re: Is it possible to get the shortcut link file used to launch an application?
#871
Author: Remy Lebeau (TeamB)
Date: Wed, 02 Jan 2008 22:31
28 lines
1991 bytes
"const * const char ME" <smakjasdhfg@iuyd.com> wrote in message 
news:477c0485$1@newsgroups.borland.com...

> From within a target applications code, is it possible to get
> the shortcut link file used to launch the application?

No.

> I need to determine the shortcut link file used to launch my application.

Why?  What is wrong with using command-line parameters?  That is why they 
exist.

> EG: c:abc\target.exe  and two shortcut links, once on the desktop
> and one in the start menu, I need to be able to inside target.exe figure
> out which link was used

The only way is to use different command-line parameters when launching the 
executable.  Besides, what if the user decides to delete, rename, or move 
the links?  Then your approach would fail anyway.

> or if it was launched directly from inside Windows explorer...

That is also not possible without using command-line parameters.


Gambit 
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