Class VolumeID
The VolumeID structure specifies information about the volume that a link target was on when the link was created. This information is useful for resolving the link if the file is not found in its original location.
Inherited Members
Namespace: SharpShellLink.Structures
Assembly: SharpShellLink.dll
Syntax
public class VolumeID : Structure
Constructors
| Edit this page View SourceVolumeID()
Constructor
Declaration
public VolumeID()
VolumeID(bool)
Constructor
Declaration
public VolumeID(bool IsUnicode)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | IsUnicode | When set to true, wide chars will be used |
Properties
| Edit this page View SourceData
Data (variable): A buffer of data that contains the volume label of the drive as a string defined by the system default code page or Unicode characters, as specified by preceding fields.
Declaration
public byte[] Data { get; }
Property Value
| Type | Description |
|---|---|
| byte[] |
DriveSerialNumber
DriveSerialNumber (4 bytes): A 32-bit, unsigned integer that specifies the drive serial number of the volume the link target is stored on.
Declaration
public uint DriveSerialNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
DriveType
DriveType (4 bytes): A 32-bit, unsigned integer that specifies the type of drive the link target is stored on.
Declaration
public DriveType DriveType { get; set; }
Property Value
| Type | Description |
|---|---|
| DriveType |
IsUnicode
When set to true, wide chars will be used
Declaration
public bool IsUnicode { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
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 SourceVolumeIDSize
VolumeIDSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in bytes, of this structure. This value MUST be greater than 0x00000010. 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 VolumeIDSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
VolumeLabel
The volume label of the drive as a string
Declaration
public string VolumeLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
VolumeLabelOffset
VolumeLabelOffset (4 bytes): A 32-bit, unsigned integer that specifies the location of a string that contains the volume label of the drive that the link target is stored on. This value is an offset, in bytes, from the start of the VolumeID structure to a NULL-terminated string of characters, defined by the system default code page. The volume label string is located in the Data field of this structure.
If the value of this field is 0x00000014, it MUST be ignored, and the value of the VolumeLabelOffsetUnicode field MUST be used to locate the volume label string.
Declaration
public uint VolumeLabelOffset { get; }
Property Value
| Type | Description |
|---|---|
| uint |
VolumeLabelOffsetUnicode
VolumeLabelOffsetUnicode (4 bytes): An optional, 32-bit, unsigned integer that specifies the location of a string that contains the volume label of the drive that the link target is stored on. This value is an offset, in bytes, from the start of the VolumeID structure to a NULL-terminated string of Unicode characters. The volume label string is located in the Data field of this structure.
If the value of the VolumeLabelOffset field is not 0x00000014, this field MUST be ignored, and the value of the VolumeLabelOffset field MUST be used to locate the volume label string.
Declaration
public uint VolumeLabelOffsetUnicode { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
| Edit this page View SourceFromByteArray(byte[])
Create a VolumeID from a given byte array
Declaration
public static VolumeID FromByteArray(byte[] ba)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | ba | The byte array |
Returns
| Type | Description |
|---|---|
| VolumeID | A VolumeID 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. |