I start a process, give it input and then tell it what to do with the
output.
I'm having trouble understanding what is happening.
When I give it the input I expect it runs it.
What is happing to the output at that point?
When I connect StandardOutput to a stream nothing is reading the stream
until some lines later.
I can't picture what is happening - even though it is working.
Can you enlighten me.
Also, if I want to abort the process can I do that?
Thanks
First I start a process
Dim StartInfo As New ProcessStartInf o
Static myProcess As New Process
StartInfo.FileN ame = "cmd"
StartInfo.Redir ectStandardInpu t = True
StartInfo.Redir ectStandardOutp ut = True
StartInfo.Creat eNoWindow = True
StartInfo.UseSh ellExecute = False
myProcess.Start Info = StartInfo
myProcess.Start ()
Then I give it input
Dim SWIn As System.IO.Strea mWriter = myProcess.Stand ardInput
more code here
Then I set the output
Dim SROut As System.IO.Strea mReader = myProcess.Stand ardOutput
more code here
output.
I'm having trouble understanding what is happening.
When I give it the input I expect it runs it.
What is happing to the output at that point?
When I connect StandardOutput to a stream nothing is reading the stream
until some lines later.
I can't picture what is happening - even though it is working.
Can you enlighten me.
Also, if I want to abort the process can I do that?
Thanks
First I start a process
Dim StartInfo As New ProcessStartInf o
Static myProcess As New Process
StartInfo.FileN ame = "cmd"
StartInfo.Redir ectStandardInpu t = True
StartInfo.Redir ectStandardOutp ut = True
StartInfo.Creat eNoWindow = True
StartInfo.UseSh ellExecute = False
myProcess.Start Info = StartInfo
myProcess.Start ()
Then I give it input
Dim SWIn As System.IO.Strea mWriter = myProcess.Stand ardInput
more code here
Then I set the output
Dim SROut As System.IO.Strea mReader = myProcess.Stand ardOutput
more code here