Class LinkInfo
The LinkInfo structure specifies information necessary to resolve a link target 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 link was created.
Inherited Members
Namespace: SharpShellLink.Structures
Assembly: SharpShellLink.dll
Syntax
public class LinkInfo : Structure
Constructors
| Edit this page View SourceLinkInfo()
Constructor
Declaration
public LinkInfo()
Properties
| Edit this page View SourceCommonNetworkRelativeLink
CommonNetworkRelativeLink (variable): An optional CommonNetworkRelativeLink structure that specifies information about the network location where the link target is stored.
Declaration
public CommonNetworkRelativeLink? CommonNetworkRelativeLink { get; set; }
Property Value
| Type | Description |
|---|---|
| CommonNetworkRelativeLink |
CommonNetworkRelativeLinkOffset
CommonNetworkRelativeLinkOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of the CommonNetworkRelativeLink field. If the CommonNetworkRelativeLinkAndPathSuffix flag is set, this value is an offset, in bytes, from the start of the LinkInfo structure; otherwise, this value MUST be zero.
Declaration
public uint CommonNetworkRelativeLinkOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
CommonPathSuffix
CommonPathSuffix (variable): A NULL–terminated string, defined by the system default code page, which is used to construct the full path to the link item or link target by being appended to the string in the LocalBasePath field.
Declaration
public string CommonPathSuffix { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CommonPathSuffixOffset
CommonPathSuffixOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of the CommonPathSuffix field. This value is an offset, in bytes, from the start of the LinkInfo structure.
Declaration
public uint CommonPathSuffixOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
CommonPathSuffixOffsetUnicode
CommonPathSuffixOffsetUnicode (4 bytes): An optional, 32-bit, unsigned integer that specifies the location of the CommonPathSuffixUnicode field. This value is an offset, in bytes, from the start of the LinkInfo structure. This field can be present only if the value of the LinkInfoHeaderSize field is greater than or equal to 0x00000024.
Declaration
public uint CommonPathSuffixOffsetUnicode { get; }
Property Value
| Type | Description |
|---|---|
| uint |
CommonPathSuffixUnicode
CommonPathSuffixUnicode (variable): An optional, NULL–terminated, Unicode string that is used to construct the full path to the link item or link target by being appended to the string in the LocalBasePathUnicode field. This field can be present only if the value of the LinkInfoHeaderSize field is greater than or equal to 0x00000024.
Declaration
public string? CommonPathSuffixUnicode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LinkInfoFlags
LinkInfoFlags (4 bytes): Flags that specify whether the VolumeID, LocalBasePath, LocalBasePathUnicode, and CommonNetworkRelativeLink fields are present in this structure.
Declaration
public LinkInfoFlags LinkInfoFlags { get; }
Property Value
| Type | Description |
|---|---|
| LinkInfoFlags |
LinkInfoHeaderSize
LinkInfoHeaderSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in bytes, of the LinkInfo header section, which is composed of the LinkInfoSize, LinkInfoHeaderSize, LinkInfoFlags, VolumeIDOffset, LocalBasePathOffset, CommonNetworkRelativeLinkOffset, CommonPathSuffixOffset fields, and, if included, the LocalBasePathOffsetUnicode and CommonPathSuffixOffsetUnicode fields.
Declaration
public uint LinkInfoHeaderSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
LinkInfoSize
LinkInfoSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in bytes, of the LinkInfo structure. All offsets specified in this structure MUST be less than this value, and all strings contained in this structure MUST fit within the extent defined by this size.
Declaration
public uint LinkInfoSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
LocalBasePath
LocalBasePath (variable): An optional, NULL–terminated string, defined by the system default code page, which is used to construct the full path to the link item or link target by appending the string in the CommonPathSuffix field. This field is present if the VolumeIDAndLocalBasePath flag is set.
Declaration
public string LocalBasePath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LocalBasePathOffset
LocalBasePathOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of the LocalBasePath field. If the VolumeIDAndLocalBasePath flag is set, this value is an offset, in bytes, from the start of the LinkInfo structure; otherwise, this value MUST be zero.
Declaration
public uint LocalBasePathOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
LocalBasePathOffsetUnicode
LocalBasePathOffsetUnicode (4 bytes): An optional, 32-bit, unsigned integer that specifies the location of the LocalBasePathUnicode field. If the VolumeIDAndLocalBasePath flag is set, this value is an offset, in bytes, from the start of the LinkInfo structure; otherwise, this value MUST be zero. This field can be present only if the value of the LinkInfoHeaderSize field is greater than or equal to 0x00000024.
Declaration
public uint LocalBasePathOffsetUnicode { get; }
Property Value
| Type | Description |
|---|---|
| uint |
LocalBasePathUnicode
LocalBasePathUnicode (variable): An optional, NULL–terminated, Unicode string that is used to construct the full path to the link item or link target by appending the string in the CommonPathSuffixUnicode field. This field can be present only if the VolumeIDAndLocalBasePath flag is set and the value of the LinkInfoHeaderSize field is greater than or equal to 0x00000024.
Declaration
public string? LocalBasePathUnicode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
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 SourceVolumeID
VolumeID (variable): An optional VolumeID structure (section 2.3.1) that specifies information about the volume that the link target was on when the link was created. This field is present if the VolumeIDAndLocalBasePath flag is set.
Declaration
public VolumeID? VolumeID { get; set; }
Property Value
| Type | Description |
|---|---|
| VolumeID |
VolumeIDOffset
VolumeIDOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of the VolumeID field. If the VolumeIDAndLocalBasePath flag is set, this value is an offset, in bytes, from the start of the LinkInfo structure; otherwise, this value MUST be zero.
Declaration
public uint VolumeIDOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
| Edit this page View SourceFromByteArray(byte[])
Create a LinkInfo from a given byte array
Declaration
public static LinkInfo FromByteArray(byte[] ba)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | ba | The byte array |
Returns
| Type | Description |
|---|---|
| LinkInfo | A LinkInfo 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. |