First of all, please excuse me if my English is not perfect, I'm not a native speaker.
Let me first describe what I'm up to:
I want to create a GUI for a command line tool which I have not written by myself.
I got so far to be able to launch the tool with desired parameters and catch its output stream to write it to a text box. I do this in a BackgroundWorker.
But now I got the following problem:
This command line tool controls other command line tools (rtmpdump and ffmpeg among others) to process certain data. If I open the tool manually in the Windows shell I can see the output of the tool itself, directly followerd by the output of the external tools...
In my wannabe GUI app, the output breaks as soon as the output of the actual command line tool ends and the output of the tools triggerd by it should be visible. Based on the files that are created, I can see that the external tools continue to run in the background nevertheless, but the BackgroundWorker finishes and I can not go on analysing the output stream.
This is what I use for reading out the stream:
while (! process.StandardOutput.EndOfStream)
So EndOfStream is reached as soon as the commandline tool runs the other tools, or in a nutshell: I can only read the output stream of the initial process, but not of those triggered by it.
I can't believe this should not be possible with C#... I think there MUST be a way to capture the console just like I was opening the tool manually in the cmd.
Up to this important detail, that stops me from proceeding with the whole GUI project, I have been able to acquire any information from docs or via Google. But now I'm realy stuck. Does anyone have an idea?
Thank you in advance!
PS: Even setting StartInfo.WorkingDirectory of the current working directory did not have the desired effect.