Class EnvironmentVariableDataBlock
The EnvironmentVariableDataBlock structure specifies a path to environment variable information when the link target refers to a location that has a corresponding environment variable.
Inherited Members
Namespace: SharpShellLink.Structures
Assembly: SharpShellLink.dll
Syntax
public class EnvironmentVariableDataBlock : ExtraDataBlock
Constructors
| Edit this page View SourceEnvironmentVariableDataBlock()
Constructor
Declaration
public EnvironmentVariableDataBlock()
EnvironmentVariableDataBlock(string)
Constructor
Declaration
public EnvironmentVariableDataBlock(string Target)
Parameters
| Type | Name | Description |
|---|---|---|
| string | Target | The path to environment variable information |
Properties
| Edit this page View SourceBlockSignature
BlockSignature (4 bytes): A 32-bit, unsigned integer that specifies the signature of the EnvironmentVariableDataBlock extra data section. This value MUST be 0xA0000001.
Declaration
public override BlockSignature BlockSignature { get; }
Property Value
| Type | Description |
|---|---|
| BlockSignature |
Overrides
| Edit this page View SourceBlockSize
BlockSize (4 bytes): A 32-bit, unsigned integer that specifies the size of the EnvironmentVariableDataBlock structure. This value MUST be 0x00000314.
Declaration
public override uint BlockSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Overrides
| Edit this page View SourceMinimumBlockSize
MinimumBlockSize (4 bytes): A 32-bit, unsigned integer that specifies the minimum size of the EnvironmentVariableDataBlock structure. This value MUST be 0x00000314
Declaration
public override uint MinimumBlockSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Overrides
| Edit this page View SourceTargetAnsi
TargetAnsi (260 bytes): A NULL-terminated string, defined by the system default code page, which specifies a path to environment variable information.
Declaration
public string TargetAnsi { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TargetUnicode
TargetUnicode (520 bytes): An optional, NULL-terminated, Unicode string that specifies a path to environment variable information.
Declaration
public string TargetUnicode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceFromByteArray(byte[])
Create an EnvironmentVariableDataBlock from a given byte array
Declaration
public static EnvironmentVariableDataBlock FromByteArray(byte[] ba)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | ba | The byte array |
Returns
| Type | Description |
|---|---|
| EnvironmentVariableDataBlock | An EnvironmentVariableDataBlock 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. |