| Shortcut File Format (.lnk) |
» Shortcut File Format (.lnk)Page: 2 of 3 By: Daniel Last updated: 24 April
Shell Item Id List
Note: This section exists only if the first bit for shortcut flags is set the header section. If that bit is not set then this section does not exists.
The first word contains the size of the list in bytes. Each item (except the last) in the list contains its size in a word fallowed by the content.
The size includes and the space used to store it. The last item has the size 0. These items are used to store various informations. For more info read the SHITEMID documentation.
File Location Info
This section is always present, but if bit 1 is not set in the flags value, then the length of
this section will be zero. The header of this section is described below.
| Size | Description |
| 1 dword | This length value includes all the assorted pathnames and other data
structures. All offsets are relative to the start of this section. |
| 1 dword | The offset at which the basic file info structure ends. Should
be 1C. |
| 1 dword | File available on local volume (0) or network share(1) |
| 1 dword | Offset to the local volume table. |
| 1 dword | Offset to the base path on the local volume. |
| 1 dword | Offset to the network volume table. |
| 1 dword | Offset to the final part of the pathname. |
Combine the base path string and the final path string to find the filename of the file on the local volume.
To find the filename of the file on the network you need to combine the share name in the
network volume table with the final path string.
The local volume table
| Size | Description |
| 1 dword | Length of this structure including
the volume label string. |
| 1 dword | Type of volume (code below) |
| 1 dword | Volume serial number |
| 1 dword | Offset of the volume name (Always 0x10) |
| ASCIZ | Volume label |
Type of volumes
| Code | Description |
| 0 | Unknown |
| 1 | No root directory |
| 2 | Removable (Floppy, Zip ...) |
| 3 | Fixed (Hard disk) |
| 4 | Remote (Network drive) |
| 5 | CD-ROM |
| 6 | Ram drive |
The network volume table
| Size | Description |
| 1 dword | Length of this structure |
| 1 dword | Always 02 |
| 1 dword | Offset of network share name (Always 0x14) |
| 1 dword | Reserved 0 |
| 1 dword | Always 0x20000 |
| ASCIZ | Network share name |
|
|
|
|
| Programming help |
Do you have problems with your code?
Please send your question to: askphp@stdlib.com Somebody will try to help you.
|
|
|