Win32 console

Win32 console is a special type of window within the system of Windows API. A Win32 console has a screen buffer and an input buffer.

The input buffer is a queue where events are stored (from keyboard, mouse etc). The output buffer is a rectangular grid where characters are stored, together with their attributes. A console window may have several output buffers, only one of which is active (i.e. displayed) for a given moment.

The console window may be displayed as a normal window on the desktop, or may be switched to full screen to use the actual hardware text mode.

Programs may access a Win32 console either via high-level functions (such as ReadConsole and WriteConsole) or via low-level functions (e.g. ReadConsoleInput and WriteConsoleOutput).

Win32 consoles are typically used for simple applications that do not need to display images (e.g. for command line tools). Terminal emulators also may use this mode.

Unicode support

Under Windows 95/98, the screen buffer mirrors the structure of VGA text buffer, with two bytes per character cell: one byte for character code, one byte for attributes (the character must be in OEM character set, the attribute is with high-intensity background/no blinking). This speeds up operation considerably if the actual VGA text mode is used.

Under Windows NT/2000/XP, the screen buffer uses four bytes per character cell: two bytes for character code, two bytes for attributes. The character is then encoded as Unicode (UCS2). For backward compatibility, the console APIs exist in two versions: Unicode and non-Unicode. The non-Unicode versions of APIs can then use codepage switching to extend the range of displayed characters (but only if TrueType fonts are used for the console window). Even UTF-8 is available as "codepage 65001".

List of Win32 console functions

  • AddConsoleAlias
  • AllocConsole
  • AttachConsole
  • CreateConsoleScreenBuffer
  • FillConsoleOutputAttribute
  • FillConsoleOutputCharacter
  • FlushConsoleInputBuffer
  • FreeConsole
  • GenerateConsoleCtrlEvent
  • GetConsoleAlias
  • GetConsoleAliases
  • GetConsoleAliasesLength
  • GetConsoleAliasExes
  • GetConsoleAliasExesLength
  • GetConsoleCP
  • GetConsoleCursorInfo
  • GetConsoleDisplayMode
  • GetConsoleFontSize
  • GetConsoleMode
  • GetConsoleOutputCP
  • GetConsoleProcessList
  • GetConsoleScreenBufferInfo
  • GetConsoleSelectionInfo
  • GetConsoleTitle
  • GetConsoleWindow
  • GetCurrentConsoleFont
  • GetLargestConsoleWindowSize
  • GetNumberOfConsoleInputEvents
  • GetNumberOfConsoleMouseButtons
  • GetStdHandle
  • HandlerRoutine
  • PeekConsoleInput
  • ReadConsole
  • ReadConsoleInput
  • ReadConsoleOutput
  • ReadConsoleOutputAttribute
  • ReadConsoleOutputCharacter
  • ScrollConsoleScreenBuffer
  • SetConsoleActiveScreenBuffer
  • SetConsoleCP
  • SetConsoleCtrlHandler
  • SetConsoleCursorInfo
  • SetConsoleCursorPosition
  • SetConsoleDisplayMode
  • SetConsoleMode
  • SetConsoleOutputCP
  • SetConsoleScreenBufferSize
  • SetConsoleTextAttribute
  • SetConsoleTitle
  • SetConsoleWindowInfo
  • SetStdHandle
  • WriteConsole
  • WriteConsoleInput
  • WriteConsoleOutput
  • WriteConsoleOutputAttribute
  • WriteConsoleOutputCharacter

See also

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools