Class ShellLinkHeader
The ShellLinkHeader structure contains identification information, timestamps, and flags that specify the presence of optional structures, including LinkTargetIDList, LinkInfo, and StringData.
Inherited Members
Namespace: SharpShellLink.Structures
Assembly: SharpShellLink.dll
Syntax
public class ShellLinkHeader : Structure
Constructors
| Edit this page View SourceShellLinkHeader()
ShellLinkHeader Constructor
Declaration
public ShellLinkHeader()
Fields
| Edit this page View SourceHeaderSize
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 |
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 |
Reserved1
A value that MUST be zero.
Declaration
public readonly ushort Reserved1
Field Value
| Type | Description |
|---|---|
| ushort |
Reserved2
A value that MUST be zero.
Declaration
public readonly uint Reserved2
Field Value
| Type | Description |
|---|---|
| uint |
Reserved3
A value that MUST be zero.
Declaration
public readonly uint Reserved3
Field Value
| Type | Description |
|---|---|
| uint |
Properties
| Edit this page View SourceAccessTime
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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
| Edit this page View SourceShowCommand
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 |
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 SourceFromByteArray(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 |
GetBytes()
Convert the Structure to a byte array
Declaration
public override byte[] GetBytes()
Returns
| Type | Description |
|---|---|
| byte[] | Byte array representation of the Structure |
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |