Class ConsoleDataBlock
The ConsoleDataBlock structure specifies the display settings to use when a link target specifies an application that is run in a console window
Inherited Members
Namespace: SharpShellLink.Structures
Assembly: SharpShellLink.dll
Syntax
public class ConsoleDataBlock : ExtraDataBlock
Constructors
| Edit this page View SourceConsoleDataBlock()
Constructor
Declaration
public ConsoleDataBlock()
Properties
| Edit this page View SourceAutoPosition
AutoPosition (4 bytes): A 32-bit, unsigned integer that specifies auto-position mode of the console window.
0x00000000 AutoPosition mode is off. 0x00000000 < value AutoPosition mode is on.
Declaration
public bool AutoPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
BlockSignature
BlockSignature (4 bytes): A 32-bit, unsigned integer that specifies the signature of the ConsoleDataBlock extra data section. This value MUST be 0xA0000002.
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 ConsoleDataBlock structure. This value MUST be 0x000000CC
Declaration
public override uint BlockSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Overrides
| Edit this page View SourceColorTable
ColorTable (64 bytes): A table of 16 32-bit, unsigned integers specifying the RGB colors that are used for text in the console window. The values of the fill attribute fields FillAttributes and PopupFillAttributes are used as indexes into this table to specify the final foreground and background color for a character.
Declaration
public byte[] ColorTable { get; set; }
Property Value
| Type | Description |
|---|---|
| byte[] |
CursorSize
CursorSize (4 bytes): A 32-bit, unsigned integer that specifies the size of the cursor, in pixels, used in the console window.
value ≤ 25 A small cursor. 26 — 50 A medium cursor. 51 — 100 A large cursor.
Declaration
public uint CursorSize { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
FaceName
Face Name (64 bytes): A 32-character Unicode string that specifies the face name of the font used in the console window
Declaration
public string FaceName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FillAttributes
FillAttributes (2 bytes): A 16-bit, unsigned integer that specifies the fill attributes that control the foreground and background text colors in the console window.
Declaration
public FillAttributes FillAttributes { get; set; }
Property Value
| Type | Description |
|---|---|
| FillAttributes |
FontFamily
FontFamily (4 bytes): A 32-bit, unsigned integer that specifies the family of the font used in the console window.
Declaration
public FontFamily FontFamily { get; set; }
Property Value
| Type | Description |
|---|---|
| FontFamily |
FontPitch
A bitwise OR of one or more of the following font-pitch bits is added to the font family
Declaration
public FontPitch FontPitch { get; set; }
Property Value
| Type | Description |
|---|---|
| FontPitch |
FontSize
FontSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in pixels, of the font used in the console window.
Declaration
public uint FontSize { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
FontWeight
FontWeight (4 bytes): A 16-bit, unsigned integer that specifies the stroke weight of the font used in the console window.
700 ≤ value A bold font. value < 700 A regular-weight font.
Declaration
public uint FontWeight { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
FullScreen
FullScreen (4 bytes): A 32-bit, unsigned integer that specifies whether to open the console window in full-screen mode.
0x00000000 Full-screen mode is off. 0x00000000 < value Full-screen mode is on.
Declaration
public bool FullScreen { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
HistoryBufferSize
HistoryBufferSize (4 bytes): A 32-bit, unsigned integer that specifies the size, in characters, of the buffer that is used to store a history of user input into the console window.
Declaration
public uint HistoryBufferSize { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
HistoryNoDup
HistoryNoDup (4 bytes): A 32-bit, unsigned integer that specifies whether to remove duplicates in the history buffer.
0x00000000 Duplicates are not allowed. 0x00000000 < value Duplicates are allowed.
Declaration
public bool HistoryNoDup { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
InsertMode
InsertMode (4 bytes): A 32-bit, unsigned integer that specifies insert mode in the console window.
0x00000000 InsertMode mode is off. 0x00000000 < value InsertMode mode is on.
Declaration
public bool InsertMode { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
MinimumBlockSize
MinimumBlockSize (4 bytes): A 32-bit, unsigned integer that specifies the minimum size of the ConsoleDataBlock structure. This value MUST be 0x000000CC
Declaration
public override uint MinimumBlockSize { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Overrides
| Edit this page View SourceNumberOfHistoryBuffers
NumberOfHistoryBuffers (4 bytes): A 32-bit, unsigned integer that specifies the number of history buffers to use.
Declaration
public uint NumberOfHistoryBuffers { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
PopupFillAttributes
PopupFillAttributes (2 bytes): A 16-bit, unsigned integer that specifies the fill attributes that control the foreground and background text color in the console window popup. The values are the same as for the FillAttributes field.
Declaration
public FillAttributes PopupFillAttributes { get; set; }
Property Value
| Type | Description |
|---|---|
| FillAttributes |
QuickEdit
QuickEdit (4 bytes): A 32-bit, unsigned integer that specifies whether to open the console window in QuikEdit mode. In QuickEdit mode, the mouse can be used to cut, copy, and paste text in the console window.
0x00000000 QuickEdit mode is off. 0x00000000 < value QuickEdit mode is on.
Declaration
public bool QuickEdit { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ScreenBufferSizeX
ScreenBufferSizeX (2 bytes): A 16-bit, signed integer that specifies the horizontal size (X axis), in characters, of the console window buffer.
Declaration
public ushort ScreenBufferSizeX { get; set; }
Property Value
| Type | Description |
|---|---|
| ushort |
ScreenBufferSizeY
ScreenBufferSizeY (2 bytes): A 16-bit, signed integer that specifies the vertical size (Y axis), in characters, of the console window buffer.
Declaration
public ushort ScreenBufferSizeY { get; set; }
Property Value
| Type | Description |
|---|---|
| ushort |
Unused1
Unused1 (4 bytes): A value that is undefined and MUST be ignored.
Declaration
public uint Unused1 { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
Unused2
Unused2 (4 bytes): A value that is undefined and MUST be ignored.
Declaration
public uint Unused2 { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
WindowOriginX
WindowOriginX (2 bytes): A 16-bit, signed integer that specifies the horizontal coordinate (X axis), in pixels, of the console window origin.
Declaration
public ushort WindowOriginX { get; set; }
Property Value
| Type | Description |
|---|---|
| ushort |
WindowOriginY
WindowOriginY (2 bytes): A 16-bit, signed integer that specifies the vertical coordinate (Y axis), in pixels, of the console window origin.
Declaration
public ushort WindowOriginY { get; set; }
Property Value
| Type | Description |
|---|---|
| ushort |
WindowSizeX
WindowSizeX (2 bytes): A 16-bit, signed integer that specifies the horizontal size (X axis), in characters, of the console window.
Declaration
public ushort WindowSizeX { get; set; }
Property Value
| Type | Description |
|---|---|
| ushort |
WindowSizeY
WindowSizeY (2 bytes): A 16-bit, signed integer that specifies the vertical size (Y axis), in characters, of the console window.
Declaration
public ushort WindowSizeY { get; set; }
Property Value
| Type | Description |
|---|---|
| ushort |
Methods
| Edit this page View SourceFromByteArray(byte[])
Create a ConsoleDataBlock from a given byte array
Declaration
public static ConsoleDataBlock FromByteArray(byte[] ba)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | ba | The byte array |
Returns
| Type | Description |
|---|---|
| ConsoleDataBlock | A ConsoleDataBlock 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. |