Skip to content

Conversation

@ayush45-ui
Copy link

Thread Handle Check---
cppHANDLE hPipeListenerThread{ reinterpret_cast(_beginthread(PipeListener, 0, hPipeIn)) };
_beginthread() returns (uintptr_t)-1 on error, but there's no error checking before proceeding.
Process Handle Cleanup---
The code closes piClient.hThread and piClient.hProcess even if CreateProcess failed, which could close invalid handles.
Thread Synchronization---
Using Sleep(500) is unreliable for thread synchronization. The listener thread may still be running when cleanup begins.
PipeListener Loop Condition---

dwBytesRead is DWORD (unsigned), so it's always >= 0. This should check for > 0 to detect EOF.
Missing Error Handling---
Several places lack proper error checking and cleanup on failure paths.

I have made the following changes to errors and issues ,
--Added thread creation error checking - Verifies _beginthread() didn't return -1
---Fixed process handle cleanup - Only closes handles if CreateProcess succeeded
--Improved thread synchronization - Closes output pipe to signal EOF, then waits for listener thread to complete
--Fixed loop condition - Changed dwBytesRead >= 0 to dwBytesRead > 0 to properly detect EOF
--Added null pointer check - Verifies lpAttributeList before cleanup

@ayush45-ui
Copy link
Author

I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@github-actions

This comment has been minimized.

DWMSBT_AUTO = 0,
DWMSBT_NONE = 1,
DWMSBT_MAINWINDOW = 2,
DWMSBT_TRANSIENTWINDOW = 3,

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TRANSIENTWINDOW is not a recognized word. (unrecognized-spelling)
DWMSBT_NONE = 1,
DWMSBT_MAINWINDOW = 2,
DWMSBT_TRANSIENTWINDOW = 3,
DWMSBT_TABBEDWINDOW = 4

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TABBEDWINDOW is not a recognized word. (unrecognized-spelling)
- `Wtypes.PROPERTYKEY PKEY_Console_`.
- `NT_CONSOLE_PROPS`.
// Try modern method first (Windows 11 22H2+)
int backdropType = DWMSBT_TRANSIENTWINDOW;

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TRANSIENTWINDOW is not a recognized word. (unrecognized-spelling)
if (hwnd == NULL)
return false;

int backdropType = DWMSBT_TABBEDWINDOW;

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TABBEDWINDOW is not a recognized word. (unrecognized-spelling)
// Check if running Windows 11 or later
static bool IsWindows11OrGreater()
{
OSVERSIONINFOEXW osvi = { sizeof(osvi) };

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

osvi is not a recognized word. (unrecognized-spelling)
"DWMSBT_AUTO": 0,
"DWMSBT_NONE": 1,
"DWMSBT_MAINWINDOW": 2,
"DWMSBT_TRANSIENTWINDOW": 3,

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TRANSIENTWINDOW is not a recognized word. (unrecognized-spelling)
"DWMSBT_NONE": 1,
"DWMSBT_MAINWINDOW": 2,
"DWMSBT_TRANSIENTWINDOW": 3,
"DWMSBT_TABBEDWINDOW": 4

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TABBEDWINDOW is not a recognized word. (unrecognized-spelling)
"steps": [
"Get window handle (HWND)",
"Check if Windows 11 or greater",
"Call DwmSetWindowAttribute with DWMSBT_TRANSIENTWINDOW",

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TRANSIENTWINDOW is not a recognized word. (unrecognized-spelling)
"use_case": "Primary windows, main application windows"
},
"mica_alt": {
"type": "DWMSBT_TRANSIENTWINDOW",

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error documentation

TRANSIENTWINDOW is not a recognized word. (unrecognized-spelling)

2. Add matching fields to Settings.hpp
- Add getters, setters, the whole drill.
#pragma comment(lib, "dwmapi.lib")

Check warning

Code scanning / check-spelling

Candidate Pattern Warning documentation

Line matches candidate pattern ^\\s*#pragma comment(lib, \".*?\") (candidate-pattern)
@github-actions
Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (4)

osvi
TABBEDWINDOW
TRANSIENTWINDOW
VCENTER

These words are not needed and should be removed coordnew

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:ayush45-ui/terminal.git repository
on the fixed branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.25/apply.pl' |
perl - 'https://github.com/microsoft/terminal/actions/runs/20469585796/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spelling/patterns/8f418d10a6e23f1c09a698152978b051c7e30892.txt:

# Automatically suggested patterns

# hit-count: 1 file-count: 1
# #pragma lib
^\s*#pragma comment\(lib, ".*?"\)

Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.

Warnings and Notices ⚠️ (2)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

⚠️ Warnings and Notices Count
ℹ️ candidate-pattern 1
⚠️ ignored-expect-variant 1

See ⚠️ Event descriptions for more information.

✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Copy link
Member

@lhecker lhecker left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand what this PR does.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 5, 2026
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

I'm sorry, this pull request doesn't look like it contains any actual code? There's a JSON file containing the "mica alt" "implementation", as a series of ... API usages and contants? You replaced a UINT with UNIT which is simply not a type, and... I mean. Everything about this is wrong. Please, if you're using some sort of LLM or agent, please verify its output before you send it to us.

@DHowett DHowett closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants