gh-132888: Fix Windows API error checking in pyrepl.windows_console (#144248)

3 files changed