the std input handle can be anything: - it's by default the input handle from which cmd.exe has been created (someone could invoke cmd.exe with "cmd /c foo.bat < COM1" and you get a serial line handle) - and it's changed with any redirection (so < COM1, < NUL, < CON would set a CHAR file type); and perhaps tomorrow | (piping) commands will be implemented with (named) pipes
Piotr's suggestion is even cleaner (as it will not accept other CHAR devices)
Note: we need to keep ReadConsole (instead of ReadFile) when we implement completion of commands