Hi, I'm writing a "more" like program in c that reads from stdin. I'm using ReadFile() from windows.h to read the string and changes the console color. Everyting works great except it's not working with choice.exe (from win2003 support tools, which is the 32bit version of choice.com).
Here is a sample of what I'm talking about.
Code:
set /p errorlevel=[RED]enter key:[/RED] | colorize.exe
choice /C:123 [RED]select[/RED] | colorize.exe
choice /C:123 [RED]select[/RED] >nul
choice /C:123 [RED]select[/RED] 2>nul
Here, "set" worked but "choice" fails. I tried redirecting stdin and stderr but the text still shows up. Is there a third stream at work here? Is there a way to get the text?
Thanks in advance.