Skip to content

Commit d297f58

Browse files
authored
Document the new 24H2 APIs (#323)
1 parent 2d4f2df commit d297f58

10 files changed

+409
-111
lines changed

docs/TOC.md

Lines changed: 108 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,143 @@
1-
# [Home](index.md)
1+
# [Home](index.md)
22

33
## [Ecosystem Roadmap](ecosystem-roadmap.md)
44
## [Definitions](definitions.md)
55
## [Console APIs vs. Virtual Terminal](classic-vs-vt.md)
66

7-
# [About Character Mode Applications](about-character-mode-applications.md)
8-
## [Input And Output Methods](input-and-output-methods.md)
7+
# [About Character Mode Applications](about-character-mode-applications.md)
8+
## [Input And Output Methods](input-and-output-methods.md)
99
## [Console Code Pages](console-code-pages.md)
1010
## [Console Control Handlers](console-control-handlers.md)
1111
## [Console Aliases](console-aliases.md)
1212
## [Console Buffer Security and Access Rights](console-buffer-security-and-access-rights.md)
1313
## [Console Application Issues](console-application-issues.md)
1414

15-
# [About Consoles](consoles.md)
16-
## [Creation of a Console](creation-of-a-console.md)
17-
## [Attaching to a Console](attaching-to-a-console.md)
15+
# [About Consoles](consoles.md)
16+
## [Creation of a Console](creation-of-a-console.md)
17+
## [Attaching to a Console](attaching-to-a-console.md)
1818
## [Closing a Console](closing-a-console.md)
19-
## [Console Handles](console-handles.md)
19+
## [Console Handles](console-handles.md)
2020
## [Console Input Buffer](console-input-buffer.md)
21-
## [Console Screen Buffers](console-screen-buffers.md)
21+
## [Console Screen Buffers](console-screen-buffers.md)
2222
## [Console Modes](console-modes.md)
2323
## [Console Process Groups](console-process-groups.md)
24-
## [Window And Screen Buffer Size](window-and-screen-buffer-size.md)
24+
## [Window And Screen Buffer Size](window-and-screen-buffer-size.md)
2525
## [Console Selection](console-selection.md)
2626
## [About Legacy Console Mode](legacymode.md)
2727
## [About Pseudoconsoles](pseudoconsoles.md)
2828

29-
# [Console Developer's guide & API Reference](console-reference.md)
30-
## [Using The Console API](using-the-console.md)
31-
### [High Level Console Input And Output Functions](high-level-console-input-and-output-functions.md)
32-
### [Using The High Level Input And Output Functions](using-the-high-level-Input-and-output-functions.md)
33-
### [High Level Console Modes](high-level-console-modes.md)
34-
### [High Level Console I/O](high-level-console-i-o.md)
29+
# [Console Developer's guide & API Reference](console-reference.md)
30+
## [Using The Console API](using-the-console.md)
31+
### [High Level Console Input And Output Functions](high-level-console-input-and-output-functions.md)
32+
### [Using The High Level Input And Output Functions](using-the-high-level-Input-and-output-functions.md)
33+
### [High Level Console Modes](high-level-console-modes.md)
34+
### [High Level Console I/O](high-level-console-i-o.md)
3535
### [Low Level Console Input Functions](low-level-console-input-functions.md)
3636
### [Low Level Console Output Functions](low-level-console-output-functions.md)
37-
### [Low Level Console I/O](low-level-console-i-o.md)
37+
### [Low Level Console I/O](low-level-console-i-o.md)
3838
### [Low Level Console Modes](low-level-console-modes.md)
39-
### [Reading And Writing Blocks Of Characters And Attributes](reading-and-writing-blocks-of-Characters-and-attributes.md)
40-
### [Reading Input Buffer Events](reading-input-buffer-events.md)
39+
### [Reading And Writing Blocks Of Characters And Attributes](reading-and-writing-blocks-of-Characters-and-attributes.md)
40+
### [Reading Input Buffer Events](reading-input-buffer-events.md)
4141
### [Clearing the screen](clearing-the-screen.md)
42-
### [Scrolling a Screen Buffer](scrolling-the-screen-buffer.md)
43-
### [Scrolling a Screen Buffer's Contents](scrolling-a-screen-buffer-s-contents.md)
44-
### [Scrolling a Screen Buffer's Window](scrolling-a-screen-buffer-s-window.md)
45-
### [Ctrl C And Ctrl Break Signals](ctrl-c-and-ctrl-break-signals.md)
46-
### [Ctrl Close Signal](ctrl-close-signal.md)
47-
### [Registering a Control Handler Function](registering-a-control-handler-function.md)
48-
### [Console Virtual Terminal Sequences](console-virtual-terminal-sequences.md)
42+
### [Scrolling a Screen Buffer](scrolling-the-screen-buffer.md)
43+
### [Scrolling a Screen Buffer's Contents](scrolling-a-screen-buffer-s-contents.md)
44+
### [Scrolling a Screen Buffer's Window](scrolling-a-screen-buffer-s-window.md)
45+
### [Ctrl C And Ctrl Break Signals](ctrl-c-and-ctrl-break-signals.md)
46+
### [Ctrl Close Signal](ctrl-close-signal.md)
47+
### [Registering a Control Handler Function](registering-a-control-handler-function.md)
48+
### [Console Virtual Terminal Sequences](console-virtual-terminal-sequences.md)
4949
### [Creating a Pseudoconsole Session](creating-a-pseudoconsole-session.md)
5050

51-
## [Console API Functions](console-functions.md)
52-
### [AddConsoleAlias](addconsolealias.md)
53-
### [AllocConsole](allocconsole.md)
54-
### [AttachConsole](attachconsole.md)
51+
## [Console API Functions](console-functions.md)
52+
### [AddConsoleAlias](addconsolealias.md)
53+
### [AllocConsole](allocconsole.md)
54+
### [AllocConsoleWithOptions](allocconsolewithoptions.md)
55+
### [AttachConsole](attachconsole.md)
5556
### [ClosePseudoConsole](closepseudoconsole.md)
56-
### [CreateConsoleScreenBuffer](createconsolescreenbuffer.md)
57-
### [CreatePseudoConsole](createpseudoconsole.md)
5857
### [ConsoleControl](consolecontrol.md)
59-
### [FillConsoleOutputAttribute](fillconsoleoutputattribute.md)
60-
### [FillConsoleOutputCharacter](fillconsoleoutputcharacter.md)
61-
### [FlushConsoleInputBuffer](flushconsoleinputbuffer.md)
62-
### [FreeConsole](freeconsole.md)
63-
### [GenerateConsoleCtrlEvent](generateconsolectrlevent.md)
64-
### [GetConsoleAlias](getconsolealias.md)
65-
### [GetConsoleAliases](getconsolealiases.md)
66-
### [GetConsoleAliasesLength](getconsolealiaseslength.md)
67-
### [GetConsoleAliasExes](getconsolealiasexes.md)
68-
### [GetConsoleAliasExesLength](getconsolealiasexeslength.md)
69-
### [GetConsoleCP](getconsolecp.md)
70-
### [GetConsoleCursorInfo](getconsolecursorinfo.md)
71-
### [GetConsoleDisplayMode](getconsoledisplaymode.md)
72-
### [GetConsoleFontSize](getconsolefontsize.md)
73-
### [GetConsoleHistoryInfo](getconsolehistoryinfo.md)
74-
### [GetConsoleMode](getconsolemode.md)
75-
### [GetConsoleOriginalTitle](getconsoleoriginaltitle.md)
76-
### [GetConsoleOutputCP](getconsoleoutputcp.md)
77-
### [GetConsoleProcessList](getconsoleprocesslist.md)
78-
### [GetConsoleScreenBufferInfo](getconsolescreenBufferinfo.md)
79-
### [GetConsoleScreenBufferInfoEx](getconsolescreenbufferinfoex.md)
80-
### [GetConsoleSelectionInfo](getconsoleselectioninfo.md)
81-
### [GetConsoleTitle](getconsoletitle.md)
82-
### [GetConsoleWindow](getconsolewindow.md)
83-
### [GetCurrentConsoleFont](getcurrentconsolefont.md)
84-
### [GetCurrentConsoleFontEx](getcurrentconsolefontex.md)
85-
### [GetLargestConsoleWindowSize](getlargestconsolewindowsize.md)
86-
### [GetNumberOfConsoleInputEvents](getnumberofconsoleinputevents.md)
87-
### [GetNumberOfConsoleMouseButtons](getnumberofconsolemousebuttons.md)
88-
### [GetStdHandle](getstdhandle.md)
89-
### [HandlerRoutine](handlerroutine.md)
90-
### [PeekConsoleInput](peekconsoleinput.md)
91-
### [ReadConsole](readconsole.md)
92-
### [ReadConsoleInput](readconsoleinput.md)
58+
### [CreateConsoleScreenBuffer](createconsolescreenbuffer.md)
59+
### [CreatePseudoConsole](createpseudoconsole.md)
60+
### [FillConsoleOutputAttribute](fillconsoleoutputattribute.md)
61+
### [FillConsoleOutputCharacter](fillconsoleoutputcharacter.md)
62+
### [FlushConsoleInputBuffer](flushconsoleinputbuffer.md)
63+
### [FreeConsole](freeconsole.md)
64+
### [GenerateConsoleCtrlEvent](generateconsolectrlevent.md)
65+
### [GetConsoleAlias](getconsolealias.md)
66+
### [GetConsoleAliases](getconsolealiases.md)
67+
### [GetConsoleAliasesLength](getconsolealiaseslength.md)
68+
### [GetConsoleAliasExes](getconsolealiasexes.md)
69+
### [GetConsoleAliasExesLength](getconsolealiasexeslength.md)
70+
### [GetConsoleCP](getconsolecp.md)
71+
### [GetConsoleCursorInfo](getconsolecursorinfo.md)
72+
### [GetConsoleDisplayMode](getconsoledisplaymode.md)
73+
### [GetConsoleFontSize](getconsolefontsize.md)
74+
### [GetConsoleHistoryInfo](getconsolehistoryinfo.md)
75+
### [GetConsoleMode](getconsolemode.md)
76+
### [GetConsoleOriginalTitle](getconsoleoriginaltitle.md)
77+
### [GetConsoleOutputCP](getconsoleoutputcp.md)
78+
### [GetConsoleProcessList](getconsoleprocesslist.md)
79+
### [GetConsoleScreenBufferInfo](getconsolescreenBufferinfo.md)
80+
### [GetConsoleScreenBufferInfoEx](getconsolescreenbufferinfoex.md)
81+
### [GetConsoleSelectionInfo](getconsoleselectioninfo.md)
82+
### [GetConsoleTitle](getconsoletitle.md)
83+
### [GetConsoleWindow](getconsolewindow.md)
84+
### [GetCurrentConsoleFont](getcurrentconsolefont.md)
85+
### [GetCurrentConsoleFontEx](getcurrentconsolefontex.md)
86+
### [GetLargestConsoleWindowSize](getlargestconsolewindowsize.md)
87+
### [GetNumberOfConsoleInputEvents](getnumberofconsoleinputevents.md)
88+
### [GetNumberOfConsoleMouseButtons](getnumberofconsolemousebuttons.md)
89+
### [GetStdHandle](getstdhandle.md)
90+
### [HandlerRoutine](handlerroutine.md)
91+
### [PeekConsoleInput](peekconsoleinput.md)
92+
### [ReadConsole](readconsole.md)
93+
### [ReadConsoleInput](readconsoleinput.md)
9394
### [ReadConsoleInputEx](readconsoleinputex.md)
94-
### [ReadConsoleOutput](readconsoleoutput.md)
95-
### [ReadConsoleOutputAttribute](readconsoleoutputattribute.md)
96-
### [ReadConsoleOutputCharacter](readconsoleoutputcharacter.md)
95+
### [ReadConsoleOutput](readconsoleoutput.md)
96+
### [ReadConsoleOutputAttribute](readconsoleoutputattribute.md)
97+
### [ReadConsoleOutputCharacter](readconsoleoutputcharacter.md)
98+
### [ReleasePseudoConsole](releasepseudoconsole.md)
9799
### [ResizePseudoConsole](resizepseudoconsole.md)
98-
### [ScrollConsoleScreenBuffer](scrollconsolescreenbuffer.md)
99-
### [SetConsoleActiveScreenBuffer](setconsoleactivescreenbuffer.md)
100-
### [SetConsoleCP](setconsolecp.md)
101-
### [SetConsoleCtrlHandler](setconsolectrlhandler.md)
102-
### [SetConsoleCursorInfo](setconsolecursorinfo.md)
103-
### [SetConsoleCursorPosition](setconsolecursorposition.md)
104-
### [SetConsoleDisplayMode](setconsoledisplaymode.md)
105-
### [SetConsoleHistoryInfo](setconsolehistoryinfo.md)
106-
### [SetConsoleMode](setconsolemode.md)
107-
### [SetConsoleOutputCP](setconsoleoutputcp.md)
108-
### [SetConsoleScreenBufferInfoEx](setconsolescreenbufferinfoex.md)
109-
### [SetConsoleScreenBufferSize](setconsolescreenbuffersize.md)
110-
### [SetConsoleTextAttribute](setconsoletextattribute.md)
111-
### [SetConsoleTitle](setconsoletitle.md)
112-
### [SetConsoleWindowInfo](setconsolewindowinfo.md)
113-
### [SetCurrentConsoleFontEx](setcurrentconsolefontex.md)
114-
### [SetStdHandle](setstdhandle.md)
115-
### [WriteConsole](writeconsole.md)
116-
### [WriteConsoleInput](writeconsoleinput.md)
117-
### [WriteConsoleOutput](writeconsoleoutput.md)
118-
### [WriteConsoleOutputAttribute](writeconsoleoutputattribute.md)
100+
### [ScrollConsoleScreenBuffer](scrollconsolescreenbuffer.md)
101+
### [SetConsoleActiveScreenBuffer](setconsoleactivescreenbuffer.md)
102+
### [SetConsoleCP](setconsolecp.md)
103+
### [SetConsoleCtrlHandler](setconsolectrlhandler.md)
104+
### [SetConsoleCursorInfo](setconsolecursorinfo.md)
105+
### [SetConsoleCursorPosition](setconsolecursorposition.md)
106+
### [SetConsoleDisplayMode](setconsoledisplaymode.md)
107+
### [SetConsoleHistoryInfo](setconsolehistoryinfo.md)
108+
### [SetConsoleMode](setconsolemode.md)
109+
### [SetConsoleOutputCP](setconsoleoutputcp.md)
110+
### [SetConsoleScreenBufferInfoEx](setconsolescreenbufferinfoex.md)
111+
### [SetConsoleScreenBufferSize](setconsolescreenbuffersize.md)
112+
### [SetConsoleTextAttribute](setconsoletextattribute.md)
113+
### [SetConsoleTitle](setconsoletitle.md)
114+
### [SetConsoleWindowInfo](setconsolewindowinfo.md)
115+
### [SetCurrentConsoleFontEx](setcurrentconsolefontex.md)
116+
### [SetStdHandle](setstdhandle.md)
117+
### [WriteConsole](writeconsole.md)
118+
### [WriteConsoleInput](writeconsoleinput.md)
119+
### [WriteConsoleOutput](writeconsoleoutput.md)
120+
### [WriteConsoleOutputAttribute](writeconsoleoutputattribute.md)
119121
### [WriteConsoleOutputCharacter](writeconsoleoutputcharacter.md)
120122

121-
## [Console API Structures](console-structures.md)
122-
### [CONSOLE_HISTORY_INFO structure](console-history-info.md)
123-
### [CONSOLE_READCONSOLE_CONTROL structure](console-readconsole-control.md)
124-
### [CONSOLE_SELECTION_INFO structure](console-selection-info-str.md)
123+
## [Console API Structures](console-structures.md)
124+
### [ALLOC_CONSOLE_OPTIONS](alloc-console-options.md)
125+
### [CHAR_INFO structure](char-info-str.md)
125126
### [CONSOLE_CURSOR_INFO structure](console-cursor-info-str.md)
126127
### [CONSOLE_FONT_INFO structure](console-font-info-str.md)
127128
### [CONSOLE_FONT_INFOEX structure](console-font-infoex.md)
128-
### [CONSOLE_SCREEN_BUFFER_INFO structure](console-screen-buffer-info-str.md)
129-
### [CONSOLE_SCREEN_BUFFER_INFOEX structure](console-screen-buffer-infoex.md)
130-
### [CHAR_INFO structure](char-info-str.md)
131-
### [COORD structure](coord-str.md)
132-
### [SMALL_RECT structure](small-rect-str.md)
133-
### [INPUT_RECORD structure](input-record-str.md)
134-
### [KEY_EVENT_RECORD structure](key-event-record-str.md)
135-
### [MENU_EVENT_RECORD structure](menu-event-record-str.md)
136-
### [MOUSE_EVENT_RECORD structure](mouse-event-record-str.md)
137-
### [FOCUS_EVENT_RECORD structure](focus-event-record-str.md)
138-
### [WINDOW_BUFFER_SIZE_RECORD structure](window-buffer-size-record-str.md)
129+
### [CONSOLE_HISTORY_INFO structure](console-history-info.md)
130+
### [CONSOLE_READCONSOLE_CONTROL structure](console-readconsole-control.md)
131+
### [CONSOLE_SCREEN_BUFFER_INFO structure](console-screen-buffer-info-str.md)
132+
### [CONSOLE_SCREEN_BUFFER_INFOEX structure](console-screen-buffer-infoex.md)
133+
### [CONSOLE_SELECTION_INFO structure](console-selection-info-str.md)
134+
### [COORD structure](coord-str.md)
135+
### [FOCUS_EVENT_RECORD structure](focus-event-record-str.md)
136+
### [INPUT_RECORD structure](input-record-str.md)
137+
### [KEY_EVENT_RECORD structure](key-event-record-str.md)
138+
### [MENU_EVENT_RECORD structure](menu-event-record-str.md)
139+
### [MOUSE_EVENT_RECORD structure](mouse-event-record-str.md)
140+
### [SMALL_RECT structure](small-rect-str.md)
141+
### [WINDOW_BUFFER_SIZE_RECORD structure](window-buffer-size-record-str.md)
139142

140-
## [Console API Winevents](console-winevents.md)
143+
## [Console API Winevents](console-winevents.md)

docs/alloc-console-options.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: ALLOC_CONSOLE_OPTIONS structure
3+
description: See reference information about the ALLOC_CONSOLE_OPTIONS structure, which contains extended information about a console screen buffer.
4+
author: lhecker
5+
ms.author: lhecker
6+
ms.topic: article
7+
keywords: console, character mode applications, command line applications, terminal applications, console api
8+
f1_keywords:
9+
- consoleapi/ALLOC_CONSOLE_OPTIONS
10+
- ALLOC_CONSOLE_OPTIONS
11+
- PALLOC_CONSOLE_OPTIONS
12+
topic_type:
13+
- apiref
14+
api_name:
15+
- ALLOC_CONSOLE_OPTIONS
16+
api_location:
17+
- WinCon.h
18+
api_type:
19+
- HeaderDef
20+
---
21+
22+
# ALLOC\_CONSOLE\_OPTIONS structure
23+
24+
Controls how **AllocConsoleWithOptions** allocates a console window.
25+
26+
## Syntax
27+
28+
```C
29+
typedef struct _ALLOC_CONSOLE_OPTIONS {
30+
ALLOC_CONSOLE_MODE mode;
31+
BOOL useShowWindow;
32+
WORD showWindow;
33+
} ALLOC_CONSOLE_OPTIONS, *PALLOC_CONSOLE_OPTIONS;
34+
```
35+
36+
## Members
37+
38+
**mode**
39+
This parameter can be one of the following values:
40+
41+
| Value | Meaning |
42+
|-|-|
43+
| **ALLOC\_CONSOLE\_MODE\_DEFAULT** 0 | Allocate a console session if one was requested by the parent process. |
44+
| **ALLOC\_CONSOLE\_MODE\_NEW\_WINDOW** 1 | Allocate a console session with a window, even if this process was created with **CREATE\_NO\_CONSOLE** or **DETACHED\_PROCESS**. |
45+
| **ALLOC\_CONSOLE\_MODE\_NO\_WINDOW** 2 | Allocate a console session without a window, even if this process was created with **CREATE\_NEW\_WINDOW** or **DETACHED\_PROCESS**. |
46+
47+
**useShowWindow**
48+
Specifies whether the **showWindow** parameter should be used.
49+
50+
**showWindow**
51+
If **useShowWindow** is **TRUE**, this specifies the **nCmdShow** used to show the console window.
52+
See [**ShowWindow**](/windows/win32/api/winuser/nf-winuser-showwindow) for more information.
53+
54+
## Requirements
55+
56+
|   |   |
57+
|-|-|
58+
| Minimum supported client | Windows 11 24H2 (build 26100) \[desktop apps only\] |
59+
| Minimum supported server | Windows Server 2025 (build 26100) |
60+
| Header | ConsoleApi.h (via WinCon.h, include Windows.h) |
61+
62+
## See also
63+
64+
[**AllocConsoleWithOptions**](allocconsolewithoptions.md)

docs/allocconsole.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: miniksa
55
ms.author: miniksa
66
ms.topic: article
77
keywords: console, character mode applications, command line applications, terminal applications, console api
8-
f1_keywords:
8+
f1_keywords:
99
- consoleapi/AllocConsole
1010
- wincon/AllocConsole
1111
- AllocConsole
@@ -77,6 +77,8 @@ This function is primarily used by a graphical user interface (GUI) application
7777
7878
[Consoles](consoles.md)
7979
80+
[**AllocConsoleWithOptions**](allocconsolewithoptions.md)
81+
8082
[**AttachConsole**](attachconsole.md)
8183
8284
[**CreateProcess**](/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa)

0 commit comments

Comments
 (0)