Recently has been a Linux project, for a long time did not come to the VC knowledge Base, first to ask you a good! It's not too late for an old age, is it? (Not that the heart of the August is not too late!!) Hey
Okay, here we are. It is known that the various properties of shortcuts can be obtained through the IShellLink interface. Concrete how to do, there are many articles on the Internet, here is not introduced. Now the main is to analyze the format of the shortcut file, and write an analytic program.
For the sake of understanding, after each paragraph, we enclose the case data of the corresponding part of the shortcut and enclose the content narration. Take a shortcut to Windows Media Player on the desktop here for example.
I. The overall structure of the document
Second, the document head
File header structure, refer to the following table:
Offset |
Size/type |
Description |
0h |
1 DWORD |
Value is usually 0000004CH, is the character "L" |
4h |
bytes |
Guid |
①14h |
1 DWORD |
Flags, which identify the optional attributes in the shortcut file, followed by a table that explains the meaning of each bit individually. |
②18h |
1 DWORD |
The target file attribute, which is explained later. |
1ch |
1 Qword |
File creation time |
24h |
1 Qword |
File modification Time |
2ch |
1 Qword |
File last access time |
54. |
1 DWORD |
Target file length |
38h |
1 DWORD |
Number of custom icons, |
3ch |
1 DWORD |
How the window is displayed when the target file executes: 1. Normal display 2. Minimize 3, maximize |
40h |
1 DWORD |
Hotkey |
44h |
2 DWORD |
It's not clear yet. Use value is usually 0 |