Capture cmd line traffic for windows application

  • Thread starter Thread starter thompson_38
  • Start date Start date
T

thompson_38

I have a COM object that wraps a console application. This console app
outputs strings, using tprintf statements, throughout execution. I
would like to capture that output from the console app and display it
in my C# Windows.Forms test application. I have tried StreamWriter,
StringWriter, OpenStandardOutput, but I only get empty strings
returned. I do not want to change the console application nor the COM
app. I am still investigating, and if I find the answer I will be sure
to post it. Thanks for your help in advance.
 
thompson_38 said:
I have a COM object that wraps a console application. This console app
outputs strings, using tprintf statements, throughout execution. I
would like to capture that output from the console app and display it
in my C# Windows.Forms test application. I have tried StreamWriter,
StringWriter, OpenStandardOutput, but I only get empty strings
returned. I do not want to change the console application nor the COM
app. I am still investigating, and if I find the answer I will be sure
to post it. Thanks for your help in advance.

I'm not clear on what you mean by 'I don't want to change the console
application', where did you put the StreamWriter, StringWriter ... then?

Willy.
 
Thank you for the information, I had tried the
http://radio.weblogs.com/01115­51/stories/2002/10/11/runASeco­ndConsole....
, but the exe is not being called directly. I am sorry for the lack of
information, this is a C# windows test application the instantiates the
COM object. The COM object is a wrapper for the C++ console
application. The StreamWriter, StringWriter are being used in the
Test applications, not in either the COM object nor the C++ console
application.
 
Back
Top