Interacting with other console applications.

  • Thread starter Thread starter schmrz
  • Start date Start date
S

schmrz

Is there any industry standard for doing this? I wrote a C# class for doing
this and it's working flawless when interacting with cmd.exe and other .NET
console applications. But when I start ftp.exe I can't read STDOUT from that
application. Same goes for some other applications (mainly consoles for
dedicated game servers).

Is there anyone with experience in this kind of applications.
 
I have tried to read stderr in a managed way and got nothing, so I'm going
to try to do it with WinAPI stdout and stdin redirection...
 
Looks like C programs use seperate IO buffers and they need to flush their
output with fflush. If they don't then redirection gets problematic. I have
read this on msdn and they say it's problematic. Does that mean it's
impossible or it can be done somehow?
 
Back
Top