I\'m trying to send commands to to the input of a cmd.exe
application using the low level read/write console functions. I have no trouble reading the text (scraping
Right now you're trying to write to your own stdin handle, not the one for the cmd.exe process. You'll have to do a lot more work to redirect the input handle for that one. It requires a pipe. Here's a KB article that shows the boilerplate code.
Btw: always check the return value of API functions.