[REBOL] .dll / api calls (part 2)
From: depotcity::telus::net at: 11-Jun-2001 12:50
Hello all.
That first project still doesn't work, it may be the VB .dll and I'm too new to try to
debug it.
If we could try something simpler... for example, adding shortcuts in Windows.
Here is the VB approach ... it uses the stkit432.dll with 4 inputs, all as strings...
Declarations
You must declare the following in the declarations section of a project.
Declare Function fCreateShellLink Lib "STKIT432.DLL" _
(ByVal lpstrFolderName as String, ByVal lpstrLinkName _
as String, ByVal lpstrLinkPath as String, ByVal _
lpstrLinkArgs as String) As Long
Use
To add a shortcut to the Start Menu, you call the function with these parameters:
a.. Where to place the link in relation to the Programs folder on the Start Menu
b.. Name or Text to appear in the link
c.. Path of the file to link to
d.. Arguments for the file
For instance, to add a shortcut to the desktop, you would use the following code:
lngResult = fCreateShellLink("..\..\Desktop", _
Link to my program
, "C:\Path\Program.exe","")