Home All Groups Group Topic Archive Search About

Using fCreateShellLink in VB6?

Author
23 Aug 2010 10:04 PM
jim evans
I used fCreateShellLink with vb5stkit.DLL successfully and reliably
under VB5, but I can't make it work with vb6stkit.DLL.

fCreateShellLink has two additional arguments with vb6stkit.DLL --
fPrivate & sParent.  I haven't found an explanation of what these
arguments are.  I thought I'd found an example of how to use the
function here http://www.tacktech.com/display.cfm?ttid=43.  But, he
simply says set the arguments equal to True and gsPROGMENUKEY.  True
may work (though won't what it's doing), but what is gsPROGMENUKEY? It
has to be a variable which he does not explain. 

Can someone help me make this function work with vb6stkit.DLL?

Author
24 Aug 2010 12:19 AM
Tony Toews
On Mon, 23 Aug 2010 17:04:36 -0500, jim evans
<jimsTAKEOUTne***@houston.rr.com> wrote:

>I used fCreateShellLink with vb5stkit.DLL successfully and reliably
>under VB5, but I can't make it work with vb6stkit.DLL.

I don't use the DLL.  I set a reference to SHELLLNK.TLB and have some
code that creates the shortcut.  Note that you do not redistribute the
TLB as it is just an interface file.

The problem is I don't recall where I found the code.  Apparently it
might come with the VB 6 sample code.   Alternatively searching on
shellnk.tlb shows some possibilties.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/
Author
24 Aug 2010 3:22 AM
Mayayana
| The problem is I don't recall where I found the code.  Apparently it
| might come with the VB 6 sample code.   Alternatively searching on
| shellnk.tlb shows some possibilties.
|
  The TLB and sample code are on the VS CD.
(I'm not sure about the VB CD.) The files are
on disk 2, in COMMON\TOOLS\VB\UNSUPPRT\SHELLLNK\
Author
24 Aug 2010 3:33 AM
Nando
Tony Toews wrote:
> jim evans wrote:
>
>> I used fCreateShellLink with vb5stkit.DLL successfully and reliably
>> under VB5, but I can't make it work with vb6stkit.DLL.
>
> I don't use the DLL.  I set a reference to SHELLLNK.TLB and have some
> code that creates the shortcut.  Note that you do not redistribute the
> TLB as it is just an interface file.
>
> The problem is I don't recall where I found the code.  Apparently it
> might come with the VB 6 sample code.   Alternatively searching on
> shellnk.tlb shows some possibilties.

That TLB sounded familiar, so I searched my computer and found the file.
The copy I have came as part of a custom VB6 setup project found at:
<http://www.jsware.net/jsware/vbcode.php5>
Author
24 Aug 2010 1:22 PM
MikeD
Show quote Hide quote
"jim evans" <jimsTAKEOUTne***@houston.rr.com> wrote in message
news:mer576t1b6gi60qlooeqbftr4bl45f8llp@4ax.com...
> I used fCreateShellLink with vb5stkit.DLL successfully and reliably
> under VB5, but I can't make it work with vb6stkit.DLL.
>
> fCreateShellLink has two additional arguments with vb6stkit.DLL --
> fPrivate & sParent.  I haven't found an explanation of what these
> arguments are.  I thought I'd found an example of how to use the
> function here http://www.tacktech.com/display.cfm?ttid=43.  But, he
> simply says set the arguments equal to True and gsPROGMENUKEY.  True
> may work (though won't what it's doing), but what is gsPROGMENUKEY? It
> has to be a variable which he does not explain.
>
> Can someone help me make this function work with vb6stkit.DLL?

You should never use vb6stkit.dll (or vb5stkit.dll) in any of your apps.  It
is intended solely for the setup program of a PDW-created package. The
danger is that if a PDW-packaged app is uninstalled, that file could very
easily be deleted as well; so, your app is now "broken".  I've seen it
happen. I've also seen this file get deleted when a setup fails or is
cancelled.

My recommendation is that you use the shelllnk.tlb file others have
mentioned.

--
Mike