This content is provided AS IS for archive purposes only. Content may be out of date with no guarantee of correctness.

WriteShortcut - Lnk for Cobra - Static

Main Article

WriteShortcut - Lnk for Cobra

Function WriteShortcut(lnk :^lnks) : Boolean

lnk: A shortcut created with CreateShortcut

Writes a shortcut to disk. Returns TRUE on success.

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

Stay Subscribed

Follow me on twitter @golightlyb, subscribe to the RSS feed or get updates by e-mail.

You can also contact me directly - I make an effort to reply to every e-mail.


Login
v0.34.archive