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

Move default implementation from win32 to nt for Windows NT #564

Open
trcrsired opened this issue Oct 28, 2023 · 3 comments
Open

Move default implementation from win32 to nt for Windows NT #564

trcrsired opened this issue Oct 28, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@trcrsired
Copy link
Member

trcrsired commented Oct 28, 2023

We do not want any immediate layer for windows.

9x kernel will still use win32

@trcrsired trcrsired added the enhancement New feature or request label Oct 28, 2023
@trcrsired trcrsired self-assigned this Nov 6, 2023
@kawaii-ghost
Copy link

return {fast_io::win32::GetStdHandle(static_cast<std::uint_least32_t>(-10))};

Console handles are accessable via ProcessEnvironment Block NtCurrentPeb()->ProcessParameters->StandardXXX. On x64 PEB is located via gs:[0x60]. I think we can get rid of GetStdHandle by accessing PEB directly.

@trcrsired
Copy link
Member Author

return {fast_io::win32::GetStdHandle(static_cast<std::uint_least32_t>(-10))};

Console handles are accessable via ProcessEnvironment Block NtCurrentPeb()->ProcessParameters->StandardXXX. On x64 PEB is located via gs:[0x60]. I think we can get rid of GetStdHandle by accessing PEB directly.

https://github.com/trcrsired/fast_io/blob/d46f04f76323cf9a9d830a187bc63d8cce7fa934/include/fast_io_hosted/platforms/nt.h#L1091

this change had already been done months ago on my sub rep. I haven't yet merged into this due to more change needs to be done.

@trcrsired
Copy link
Member Author

trcrsired@bead5e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants