Eryk Sun

Results 42 comments of Eryk Sun

`ReadFile` and `ReadConsoleA` are currently limited to 7-bit ASCII when the input codepage is UTF-8 (65001) due to an assumption of 1 `CHAR` per `WCHAR` when calling `WideCharToMultiByte`. A ordinal...

> I think if you want to use `ReadFile` (NOT `ReadFileW`), you'll probably want to stick to UTF-8 (codepage 65001). In which version(s) of Windows and Windows Terminal, or with...

> BTW, you can have a relative symbolic link that points to `\` in Windows and it points to the root of the file system that it is in. WinFsp...

I use the standard hex numpad input method. It works correctly in conhost, but not in Terminal. This input method is disabled by default, but it can be enabled by...

> `process.CloseMainWindow();` The console session [1] that gets created by Windows Terminal is a pseudoconsole session, for which the root process doesn't effectively own any window. To make the above...

> I can't find the particular code in the OS that's looking exactly for `ConsoleWindowClass`, but there's a _lot_ of code that does that. It's implemented by the system call...

> This allows using the pid of the effective owner to gracefully shut down the entire console session, e.g. via `taskkill /pid `. Unfortunately this won't help with .NET [`Process.CloseMainWindow()`](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.closemainwindow?view=net-6.0#System_Diagnostics_Process_CloseMainWindow),...

Without knowing the details of what's possible, I'd expect Terminal to honor relevant fields in [`STARTUPINFO`](https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfow) after a handoff from conhost. When a new tab (not a window) is created,...

ISTM that only the console host process, "OpenConsole.exe", would need to be tracked for the lifetime of a tab. It's responsible for managing the console session and will exit when...

> try CancelIo and CancelSynchronousIo on the off chance that they'd work instead of polling, > but they just don't work on console input In Windows 8+, `CancelSynchronousIo()` works for...