Windows shortcut file Format Resolution

Source: Internet
Author: User
Tags knowledge base

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.