EDN Admin
Well-known member
<span>How to redirect STDIN of CMD.exe in C++ programme?
Hi All
I am trying to redirect STD handles of cmd.exe in my programmes. I am able to redierct STDOUT and STDERR, but rediercting STDIN is not workin. I wiash that whenevr i create a new process "CMD.exe" it should obtain its input from a file say input is dir and write the output to a file.
I am able to write the output to a file , but I am unable to redirect the STDIN of the process. I have tried using CreatePipe , but eve that is not helpin. Any live CODE example on how to do it will be very helpful.
Thanks in advance..
Sumit Chawla
View the full article
Hi All
I am trying to redirect STD handles of cmd.exe in my programmes. I am able to redierct STDOUT and STDERR, but rediercting STDIN is not workin. I wiash that whenevr i create a new process "CMD.exe" it should obtain its input from a file say input is dir and write the output to a file.
I am able to write the output to a file , but I am unable to redirect the STDIN of the process. I have tried using CreatePipe , but eve that is not helpin. Any live CODE example on how to do it will be very helpful.
Thanks in advance..
Sumit Chawla
View the full article