Capturing stdout from an external program
-
I have two different applications appDad and appKid. appDad is a Windows Forms Application and it calls appKid.exe. appKid does a series of prinf´s that I want to display in a text box in appDad. Some suggest that I use
FILE * output = _popen ("ls", "r")
orfreopen ("/dev/tty", "w", stdout)
but I´m not quite sure what I´m doing. Am I being lazy for asking instead of researching a bit more? I hope not... -
I have two different applications appDad and appKid. appDad is a Windows Forms Application and it calls appKid.exe. appKid does a series of prinf´s that I want to display in a text box in appDad. Some suggest that I use
FILE * output = _popen ("ls", "r")
orfreopen ("/dev/tty", "w", stdout)
but I´m not quite sure what I´m doing. Am I being lazy for asking instead of researching a bit more? I hope not... -
-
piul wrote:
But... is there a simpler way to do it in .NET?
.NET is a framework, not a language. If you are referring to Managed C++, see here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius