• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpShellLink
      • Shortcut
    • SharpShellLink.Const
      • KNOWNFOLDERID
    • SharpShellLink.Flags
      • CSIDL
      • CommonNetworkRelativeLinkFlags
      • DriveType
      • FileAttributesFlags
      • FillAttributes
      • FontFamily
      • FontPitch
      • HotKeyFlags
      • LinkFlags
      • LinkInfoFlags
      • ModifierKeys
      • NetworkProviderType
      • ShowCommand
      • VirtualKeyCodes
    • SharpShellLink.PropertyStore
      • IntegerName
      • PropertyType
      • SerializedPropertyStorage
      • SerializedPropertyStore
      • SerializedPropertyValue
      • StringName
      • Structure
      • TypedPropertyValue
    • SharpShellLink.Structures
      • BlockSignature
      • CommonNetworkRelativeLink
      • ConsoleDataBlock
      • ConsoleFEDataBlock
      • CplLinkTargetIDList
      • DarwinDataBlock
      • EnvironmentVariableDataBlock
      • ExtraData
      • ExtraDataBlock
      • IDList
      • IconEnvironmentDataBlock
      • ItemID
      • KnownFolderDataBlock
      • LinkInfo
      • LinkTargetIDList
      • PropertyStoreDataBlock
      • ShellLinkHeader
      • ShimDataBlock
      • SpecialFolderDataBlock
      • StringData
      • Structure
      • TerminalBlock
      • TrackerDataBlock
      • VistaAndAboveIDListDataBlock
      • VolumeID

    Class ShellLinkHeader

    The ShellLinkHeader structure contains identification information, timestamps, and flags that specify the presence of optional structures, including LinkTargetIDList, LinkInfo, and StringData.

    Inheritance
    object
    Structure
    ShellLinkHeader
    Shortcut
    Inherited Members
    Structure.Errors
    Structure.ValidateInputDataSize(int)
    Structure.ValidateHeaderBlockSize(ref byte[], bool)
    Structure.Validate(ref byte[], bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: SharpShellLink.Structures
    Assembly: SharpShellLink.dll
    Syntax
    public class ShellLinkHeader : Structure

    Constructors

    | Edit this page View Source

    ShellLinkHeader()

    ShellLinkHeader Constructor

    Declaration
    public ShellLinkHeader()

    Fields

    | Edit this page View Source

    HeaderSize

    HeaderSize (4 bytes): The size, in bytes, of this structure. This value MUST be 0x0000004C

    Declaration
    public readonly uint HeaderSize
    Field Value
    Type Description
    uint
    | Edit this page View Source

    LinkCLSID

    LinkCLSID (16 bytes): A class identifier (CLSID). This value MUST be 00021401-0000-0000-C000-000000000046.

    Declaration
    public readonly Guid LinkCLSID
    Field Value
    Type Description
    Guid
    | Edit this page View Source

    Reserved1

    A value that MUST be zero.

    Declaration
    public readonly ushort Reserved1
    Field Value
    Type Description
    ushort
    | Edit this page View Source

    Reserved2

    A value that MUST be zero.

    Declaration
    public readonly uint Reserved2
    Field Value
    Type Description
    uint
    | Edit this page View Source

    Reserved3

    A value that MUST be zero.

    Declaration
    public readonly uint Reserved3
    Field Value
    Type Description
    uint

    Properties

    | Edit this page View Source

    AccessTime

    AccessTime (8 bytes): A FILETIME structure that specifies the access time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no access time set on the link target.

    Declaration
    public long AccessTime { get; set; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    CreationTime

    CreationTime (8 bytes): A FILETIME structure that specifies the creation time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no creation time set on the link target.

    Declaration
    public long CreationTime { get; set; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    FileAttributes

    FileAttributes (4 bytes): A FileAttributesFlags structure that specifies information about the link target.

    Declaration
    public FileAttributesFlags FileAttributes { get; set; }
    Property Value
    Type Description
    FileAttributesFlags
    | Edit this page View Source

    FileSize

    FileSize (4 bytes): A 32-bit unsigned integer that specifies the size, in bytes, of the link target. If the link target file is larger than 0xFFFFFFFF, this value specifies the least significant 32 bits of the link target file size.

    Declaration
    public uint FileSize { get; set; }
    Property Value
    Type Description
    uint
    | Edit this page View Source

    HotKey

    HotKey (2 bytes): A HotKeyFlags structure that specifies the keystrokes used to launch the application referenced by the shortcut key. This value is assigned to the application after it is launched, so that pressing the key activates that application.

    Declaration
    public HotKeyFlags HotKey { get; set; }
    Property Value
    Type Description
    HotKeyFlags
    | Edit this page View Source

    IconIndex

    IconIndex (4 bytes): A 32-bit signed integer that specifies the index of an icon within a given icon location.

    Declaration
    public int IconIndex { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    LinkFlags

    LinkFlags (4 bytes): A LinkFlags structure that specifies information about the shell link and the presence of optional portions of the structure.

    Declaration
    public virtual LinkFlags LinkFlags { get; set; }
    Property Value
    Type Description
    LinkFlags
    | Edit this page View Source

    MinimumBlockSize

    headerBlockSize (4 bytes): A 32-bit, unsigned integer that specifies the size of the ExtraDataBlock structure.

    Declaration
    public override uint MinimumBlockSize { get; }
    Property Value
    Type Description
    uint
    Overrides
    Structure.MinimumBlockSize
    | Edit this page View Source

    ShowCommand

    ShowCommand (4 bytes): A 32-bit unsigned integer that specifies the expected window state of an application launched by the link.

    Declaration
    public ShowCommand ShowCommand { get; set; }
    Property Value
    Type Description
    ShowCommand
    | Edit this page View Source

    WriteTime

    WriteTime (8 bytes): A FILETIME structure that specifies the write time of the link target in UTC (Coordinated Universal Time). If the value is zero, there is no write time set on the link target.

    Declaration
    public long WriteTime { get; set; }
    Property Value
    Type Description
    long

    Methods

    | Edit this page View Source

    FromByteArray(byte[])

    Create a ShellLinkHeader from a given byte array

    Declaration
    public static ShellLinkHeader FromByteArray(byte[] ba)
    Parameters
    Type Name Description
    byte[] ba

    The byte array

    Returns
    Type Description
    ShellLinkHeader

    A ShellLinkHeader object

    | Edit this page View Source

    GetBytes()

    Convert the Structure to a byte array

    Declaration
    public override byte[] GetBytes()
    Returns
    Type Description
    byte[]

    Byte array representation of the Structure

    Overrides
    Structure.GetBytes()
    | Edit this page View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    Structure.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2017 Securify B.V., 2026 Jérémy Ansel