Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Controls how AllocConsoleWithOptions allocates a console window.
Syntax
typedef struct _ALLOC_CONSOLE_OPTIONS {
ALLOC_CONSOLE_MODE mode;
BOOL useShowWindow;
WORD showWindow;
} ALLOC_CONSOLE_OPTIONS, *PALLOC_CONSOLE_OPTIONS;
Members
mode This parameter can be one of the following values:
| Value | Meaning |
|---|---|
| ALLOC_CONSOLE_MODE_DEFAULT 0 | Allocate a console session if one was requested by the parent process. |
| 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. |
| 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. |
useShowWindow Specifies whether the showWindow parameter should be used.
showWindow If useShowWindow is TRUE, this specifies the nCmdShow used to show the console window. See ShowWindow for more information.
Requirements
| Minimum supported client | Windows 11 24H2 (build 26100) [desktop apps only] |
| Minimum supported server | Windows Server 2025 (build 26100) |
| Header | ConsoleApi.h (via WinCon.h, include Windows.h) |