The Lnk Type
The lnk record exposes the following variables:
Type lnks = Record
lPath : String = ""
lTargetPath : String = ""
lRelativePath : String = ""
lStartIn : String = ""
lDescription : String = ""
lWorkingDir : String = ""
lCustomIcon : String = ""
lArguments : String = ""
lIconIndex : Integer = 0
lFlag : Array [7] of Boolean
lAttribute : Array [13] of Boolean
lVolume : Array [2] of Boolean
lVolumeType : Integer = 0
lVolumeSerial : Integer = 0
lVolumeLabel : String = "UNKNOWN"
lShareName : String = ""
lShowWnd : Integer = LNK_SWND_NORMAL
lCreationTime : Integer = 0
lModificationTime : Integer = 0
lLastAccessTime : Integer = 0
lTargetFileSize : Integer = 0
lHotKey : Integer = 0
EndType ; Export
The unit exports "lnk" as a pointer to lnks, which you can use without having to declare your own locally. For example:
Include "lnk.bb"
ReadShortcut("My Shortcut.lnk")
RuntimeError("Path is " + lnk\lTargetPath$)
ReadShortcut("My Shortcut (2).lnk")
RuntimeError("Path is " + lnk\lTargetPath$)