[][src]Crate lnk

Shell Link parser and writer for Rust.

Works on any OS - although only really useful in Windows, this library can parse and write .lnk files, a shell link, that can be understood by Windows.

To get started, see the ShellLink struct.

The full specification of these files can be found at Microsoft's Website.

Example

A simple example appears as follows:

use lnk::ShellLink;
// ...
ShellLink::new_simple(std::path::Path::new(r"C:\Windows\System32\notepad.exe"));

Structs

FileAttributeFlags

The FileAttributesFlags structure defines bits that specify the file attributes of the link target, if the target is a file system item. File attributes can be used if the link target is not available, or if accessing the target would be inefficient. It is possible for the target items attributes to be out of sync with this value.

HotkeyFlags

The HotkeyFlags structure specifies input generated by a combination of keyboard keys being pressed.

HotkeyModifiers

An 8-bit unsigned integer that specifies bits that correspond to modifier keys on the keyboard.

LinkFlags

The LinkFlags structure defines bits that specify which shell linkstructures are present in the file format after the ShellLinkHeaderstructure (section 2.1).

LinkInfo

The LinkInfo structure specifies information necessary to resolve a linktarget if it is not found in its original location. This includes information about the volume that the target was stored on, the mapped drive letter, and a Universal Naming Convention (UNC)form of the path if one existed when the linkwas created. For more details about UNC paths, see [MS-DFSNM] section 2.2.1.4

LinkTargetIdList

The LinkTargetIDList structure specifies the target of the link. The presence of this optional structure is specified by the HasLinkTargetIDList bit (LinkFlagssection 2.1.1) in the ShellLinkHeader(section2.1).

ShellLink

A shell link

ShellLinkHeader

A ShellLinkHeader structure (section 2.1), which contains identification information, timestamps, and flags that specify the presence of optional structures.

Enums

ExtraData

ExtraData refers to a set of structures that convey additional information about a link target. These optional structures can be present in an extra data section that is appended to the basic Shell Link Binary File Format.

HotkeyKey

An 8-bit unsigned integer that specifies a virtual key code that corresponds to a key on the keyboard.

ShowCommand

The expected window state of an application launched by the link.