Expand description
§Shell Link writer for Rust.
Works on Windows,theoretically support Windows 7,8,10.
§Example
A simple example appears as follows:
use mslnk::ShellLink;
// ...
let target = r"C:\Users\Admin\Desktop\qq aa\qiuqiu.exe";
let lnk = r"C:\Users\Admin\Desktop\qq.lnk";
let sl = ShellLink::new(target).unwrap();
sl.create_lnk(lnk).unwrap();
``Structs§
- File
Attribute Flags - 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.
- Hotkey
Flags - The HotkeyFlags structure specifies input generated by a combination of keyboard keys being pressed.
- Hotkey
Modifiers - An 8-bit unsigned integer that specifies bits that correspond to modifier keys on the keyboard.
- Link
Flags - The LinkFlags structure defines bits that specify which shell linkstructures are present in the file format after the ShellLinkHeaderstructure (section 2.1).
- Link
Info - 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
- Link
Target IdList - MSLink
Error - Shell
Link - A shell link
- Shell
Link Header - A ShellLinkHeader structure (section 2.1), which contains identification information, timestamps, and flags that specify the presence of optional structures.
Enums§
- Extra
Data - 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.
- Hotkey
Key - An 8-bit unsigned integer that specifies a virtual key code that corresponds to a key on the keyboard.
- Show
Command - The expected window state of an application launched by the link.