CreateShortcut

Function CreateShortcut(lnkpath:String, volume: Integer, volume_type: Integer) : ^lnks

lnkpath: The path to a shortcut file to create. If the file extension ".lnk" is not included, it will be done appended automatically

volume: The volume that the lnk file will be created on (currently, only LNK_VOLUME_LOCAL is valid).

volume_type: The type of volume that the lnk file will be created on (e.g. LNK_VOLUME_TYPE_FIXED) - see Exported Constants, section lVolumeType.

Creates and returns a handle for a new shortcut.

Example:

Program
  Uses

      lnk

Begin
   lnk = CreateShortcut("My Shortcut", LNK_VOLUME_LOCAL, LNK_VOLUME_TYPE_FIXED)
       lnk.lDescription = "Here's my test shortcut!!!"
       lnk.lTargetPath = CurrentDir + "\testlnk.exe"
       lnk.lRelativePath = ".\testlnk.exe"
       lnk.lWorkingDir = CurrentDir
       lnk.lCustomIcon = CurrentDir + "\test.ico"
       If WriteShortcut(lnk) = FALSE then MessageBox("Couldn't create shortcut")
   
   Free(lnk)
End