• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpShellLink
      • Shortcut
    • SharpShellLink.Const
      • KNOWNFOLDERID
    • SharpShellLink.Flags
      • CSIDL
      • CommonNetworkRelativeLinkFlags
      • DriveType
      • FileAttributesFlags
      • FillAttributes
      • FontFamily
      • FontPitch
      • HotKeyFlags
      • LinkFlags
      • LinkInfoFlags
      • ModifierKeys
      • NetworkProviderType
      • ShowCommand
      • VirtualKeyCodes
    • SharpShellLink.PropertyStore
      • IntegerName
      • PropertyType
      • SerializedPropertyStorage
      • SerializedPropertyStore
      • SerializedPropertyValue
      • StringName
      • Structure
      • TypedPropertyValue
    • SharpShellLink.Structures
      • BlockSignature
      • CommonNetworkRelativeLink
      • ConsoleDataBlock
      • ConsoleFEDataBlock
      • CplLinkTargetIDList
      • DarwinDataBlock
      • EnvironmentVariableDataBlock
      • ExtraData
      • ExtraDataBlock
      • IDList
      • IconEnvironmentDataBlock
      • ItemID
      • KnownFolderDataBlock
      • LinkInfo
      • LinkTargetIDList
      • PropertyStoreDataBlock
      • ShellLinkHeader
      • ShimDataBlock
      • SpecialFolderDataBlock
      • StringData
      • Structure
      • TerminalBlock
      • TrackerDataBlock
      • VistaAndAboveIDListDataBlock
      • VolumeID

    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

    Inheritance
    object
    Structure
    ExtraDataBlock
    ConsoleDataBlock
    Inherited Members
    ExtraDataBlock.ValidateHeaderBlockSignature(ref byte[])
    ExtraDataBlock.Validate(ref byte[], bool)
    Structure.Errors
    Structure.ValidateInputDataSize(int)
    Structure.ValidateHeaderBlockSize(ref byte[], bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: SharpShellLink.Structures
    Assembly: SharpShellLink.dll
    Syntax
    public class ConsoleDataBlock : ExtraDataBlock

    Constructors

    | Edit this page View Source

    ConsoleDataBlock()

    Constructor

    Declaration
    public ConsoleDataBlock()

    Properties

    | Edit this page View Source

    AutoPosition

    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
    | Edit this page View Source

    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
    ExtraDataBlock.BlockSignature
    | Edit this page View Source

    BlockSize

    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
    ExtraDataBlock.BlockSize
    | Edit this page View Source

    ColorTable

    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[]
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    Structure.MinimumBlockSize
    | Edit this page View Source

    NumberOfHistoryBuffers

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    Unused1

    Unused1 (4 bytes): A value that is undefined and MUST be ignored.

    Declaration
    public uint Unused1 { get; set; }
    Property Value
    Type Description
    uint
    | Edit this page View Source

    Unused2

    Unused2 (4 bytes): A value that is undefined and MUST be ignored.

    Declaration
    public uint Unused2 { get; set; }
    Property Value
    Type Description
    uint
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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
    | Edit this page View Source

    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 Source

    FromByteArray(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

    | Edit this page View Source

    GetBytes()

    Convert the Structure to a byte array

    Declaration
    public override byte[] GetBytes()
    Returns
    Type Description
    byte[]

    Byte array representation of the Structure

    Overrides
    Structure.GetBytes()
    | Edit this page View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    ExtraDataBlock.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2017 Securify B.V., 2026 Jérémy Ansel