C
Christophe Helfer
hi,
I have some problem with redirecting input and output from a process.
Situation:
I have to use the Cisco Network Registrar (DNS And DHCP server) command
line utility as redirecting its input and output so I can interact with this
one. This utility is similar to ftp under a win32 console. It proposes its
own prompt after launching it.
What I want to do is:
- input some command (normally I have to write into the input stream)
- then get the response from the output stream.
This operations sequence must be repeated more than one time
I create a process with the right parameter such as useshell=false and
redirect in,out,err =true and app name =cmd.exe
(when I use directly app=<utility> it does not work)
when I write the command into the InputStream, I go a correct response into
the response stream but incomplete. In fact, there is one or more streams
behind the first one. You can get these streams if you pass in addition to
the peek function.
Then, after gathering the last stream the application freeze !
I already seek for code to achieve my goal but all code I've found doesn't
work for my situation
Code tested : VB.Net, VB and API, C/C++
How can I solve my problem, can anyone help me!
After many and many hours searching, I despair
Thanks a lot!
I have some problem with redirecting input and output from a process.
Situation:
I have to use the Cisco Network Registrar (DNS And DHCP server) command
line utility as redirecting its input and output so I can interact with this
one. This utility is similar to ftp under a win32 console. It proposes its
own prompt after launching it.
What I want to do is:
- input some command (normally I have to write into the input stream)
- then get the response from the output stream.
This operations sequence must be repeated more than one time
I create a process with the right parameter such as useshell=false and
redirect in,out,err =true and app name =cmd.exe
(when I use directly app=<utility> it does not work)
when I write the command into the InputStream, I go a correct response into
the response stream but incomplete. In fact, there is one or more streams
behind the first one. You can get these streams if you pass in addition to
the peek function.
Then, after gathering the last stream the application freeze !
I already seek for code to achieve my goal but all code I've found doesn't
work for my situation
Code tested : VB.Net, VB and API, C/C++
How can I solve my problem, can anyone help me!
After many and many hours searching, I despair
Thanks a lot!