Skip to content

Document the new 24H2 APIs #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 9, 2025
Merged

Document the new 24H2 APIs #323

merged 4 commits into from
Jul 9, 2025

Conversation

lhecker
Copy link
Contributor

@lhecker lhecker commented Aug 14, 2024

Adds documentation for:

  • Console Allocation Policy
  • AllocConsoleWithOptions and its accompanying struct
  • ReleasePseudoConsole
  • Changed behavior of ClosePseudoConsole

@lhecker lhecker requested a review from DHowett August 14, 2024 15:08
## [Console API Functions](console-functions.md)
### [AddConsoleAlias](addconsolealias.md)
### [AllocConsole](allocconsole.md)
### [AllocConsoleWithOptions](allocconsolewithoptions.md)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Learn Build status updates of commit 20768a8:

✅ Validation status: passed

File Status Preview URL Details
docs/alloc-console-options.md ✅Succeeded View
docs/allocconsole.md ✅Succeeded View
docs/allocconsolewithoptions.md ✅Succeeded View
docs/attachconsole.md ✅Succeeded View
docs/closepseudoconsole.md ✅Succeeded View
docs/console-allocation-policy.md ✅Succeeded View
docs/console-functions.md ✅Succeeded View
docs/console-structures.md ✅Succeeded View
docs/releasepseudoconsole.md ✅Succeeded View
docs/TOC.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

### [KEY_EVENT_RECORD structure](key-event-record-str.md)
### [MENU_EVENT_RECORD structure](menu-event-record-str.md)
### [MOUSE_EVENT_RECORD structure](mouse-event-record-str.md)
### [SMALL_RECT structure](small-rect-str.md)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I sorted these alphabetically.

Copy link
Contributor

Learn Build status updates of commit ebda27d:

✅ Validation status: passed

File Status Preview URL Details
docs/alloc-console-options.md ✅Succeeded View
docs/allocconsole.md ✅Succeeded View
docs/allocconsolewithoptions.md ✅Succeeded View
docs/attachconsole.md ✅Succeeded View
docs/closepseudoconsole.md ✅Succeeded View
docs/console-allocation-policy.md ✅Succeeded View
docs/console-functions.md ✅Succeeded View
docs/console-structures.md ✅Succeeded View
docs/releasepseudoconsole.md ✅Succeeded View
docs/TOC.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:


## Examples

For a full walkthrough on using this function to establish a pseudoconsole session, please see [Creating a Pseudoconsole Session](creating-a-pseudoconsole-session.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR doesn't change this file - should it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I think we should merge this first, because that article could use a bigger overhaul.


## Remarks

Before this method was introduced, the initial pseudoconsole API was inherently flawed: **ClosePseudoConsole** would only exit until after the pseudoconsole has finished using the output pipe. This meant that the pseudoconsole effectively kept your application alive. The **HPCON** handle owned by your application on the other hand kept the pseudoconsole session alive until **ClosePseudoConsole** was called. This created a lifetime and ownership loop. The way applications were expected to break this loop up was by manually waiting for the spawned terminal processes to exit and then call **ClosePseudoConsole**. This made the API failure prone and resulted in shutdown deadlocks in various applications.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rephrase the "inherently flawed" part... but i am not sure how

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(We don't usually editorialize in the docs!)

|   |   |
|-|-|
| Minimum supported client | Windows 11 24H2 (build 26100) \[desktop apps only\] |
| Minimum supported server | n/a |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Minimum supported server | n/a |
| Minimum supported server | Windows Server 2025 (build 26100) |

|   |   |
|-|-|
| Minimum supported client | Windows 11 24H2 (build 26100) \[desktop apps only\] |
| Minimum supported server | n/a |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same note about server 2025 applies to all of these

Copy link
Contributor

Learn Build status updates of commit f8a59d2:

💡 Validation status: suggestions

File Status Preview URL Details
docs/allocconsolewithoptions.md 💡Suggestion View Details
docs/releasepseudoconsole.md 💡Suggestion View Details
docs/alloc-console-options.md ✅Succeeded View
docs/allocconsole.md ✅Succeeded View
docs/attachconsole.md ✅Succeeded View
docs/closepseudoconsole.md ✅Succeeded View
docs/console-allocation-policy.md ✅Succeeded View
docs/console-functions.md ✅Succeeded View
docs/console-structures.md ✅Succeeded View
docs/TOC.md ✅Succeeded View

docs/allocconsolewithoptions.md

  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

docs/releasepseudoconsole.md

  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@lhecker lhecker merged commit d297f58 into main Jul 9, 2025
2 checks passed
@lhecker lhecker deleted the dev/lhecker/24h2 branch July 9, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants