A
agostino
I've realized an application that acts like a console.
It opens 2 pipes (CreatePipe api) and a process
(CreateProcess( .... ,"cmd.exe", ....).
So I get the output of cmd (the well-known console) and I'm able to send
commands to it.
I use ReadFile in a separate thread in order to get the output of the output
pipe.
I used a separate thread because if there's no more output, ReadFile blocks
and waits for new output.
It works fine in just a few lines of code. Now I would like to know when
ReadFile has finished to read the results. Actually when the ReadFile is
executing I've no way to detected whether it's locked (=it has finished) or
it's reading something.
thanks
Agostino
It opens 2 pipes (CreatePipe api) and a process
(CreateProcess( .... ,"cmd.exe", ....).
So I get the output of cmd (the well-known console) and I'm able to send
commands to it.
I use ReadFile in a separate thread in order to get the output of the output
pipe.
I used a separate thread because if there's no more output, ReadFile blocks
and waits for new output.
It works fine in just a few lines of code. Now I would like to know when
ReadFile has finished to read the results. Actually when the ReadFile is
executing I've no way to detected whether it's locked (=it has finished) or
it's reading something.
thanks
Agostino