Skip to content
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

Document the new 24H2 APIs #323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Document the new 24H2 APIs #323

wants to merge 2 commits into from

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?


## 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!)

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