Guidance
指路人
g.yi.org
software / rapidq / Examples / Memory Process Thread Message / shell / CreateShellLink.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'Need STKIT432.DLL (http://g.yi.org/search.php?search=stkit432)

'From:  Jacques Philippe  Sun Dec 29, 2002  7:10 pm

'STKIT432.DLL Has to be found (not in Windows)
'For Special Folders, see API
'Declare Function SHGetSpecialFolderLocation Lib "shell32" Alias
'"SHGetSpecialFolderLocation" _
'(ByVal hwndOwner As Long, ByVal nFolder As Long,
'pidl As Long) As Long

'Here it Adds A ShortCut To Bureau which is DeskTop in french.
'SHGetSpecialFolderLocation
'Would retrieve the Bureau/Desktop/orWhateverLanguageIsSet PathName

' ---- Start RQ Code ----
'
' CREATES A SHORTCUT/LINKS
'
     $ESCAPECHARS ON
     $TYPECHECK ON
     $INCLUDE "RAPIDQ.INC"
'
     DECLARE FUNCTION fCreateShellLink LIB "STKIT432.DLL" ALIAS "fCreateShellLink"(BYVAL _
      lpstrFolderName AS STRING, BYVAL lpstrLinkName AS STRING, BYVAL _
      lpstrLinkPath AS STRING, BYVAL lpstrLinkArgs AS STRING) AS LONG
'
     DEFINT lReturn

'Add to Desktop
     DEFSTR addTo, addName, addWhat, nullString
     nullString = ""

'Add to Desktop
     addTo = "..\\..\\Bureau"
     addName = "Shortcut to Calculator"
     addWhat = "c:\\Windows\\Calc.exe"
     nullString = ""
'
' BOTH LINES WORK WITHOUT CHANGING THE API DECLARATION ARGUMENT
'
'lReturn = fCreateShellLink( "..\\..\\Bureau", "Shortcut to Calculator","c:\\Windows\\calc.exe", "")
     lReturn = fCreateShellLink(addTo, addName, addWhat, nullString)
'
     PRINT "Result : 1=OK/ 0=FAILURE, fCreatreShellLink_Return=";STR$(lReturn)
'
' -------------------------------------------------------------
' EXIT CONSOLE
' ------------
     DEFSTR sExit
     INPUT "\n\n CR to QUIT \n\n", sExit
     Application.Terminate
     END
掌柜推荐
 
 
¥1,420.00 ·
 
 
¥470.00 ·
 
 
¥880.00 ·
 
 
¥790.00 ·
 
 
¥1,580.00 ·
 
 
¥317.00 ·
© Wed 2024-11-6  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2004-05-22 08:16:32