473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Capture cmd line traffic for windows application

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.

Nov 17 '05 #1
7 2341
Thompson_38,
I think this is the exact answer to what you are trying to do.
http://radio.weblogs.com/0111551/sto...ItsOutput.html

--
in**@dowhileloop.com
http://dowhileloop.com website development
http://publicjoe.dowhileloop.com -- C# Tutorials

"thompson_38" <th*********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.

Nov 17 '05 #2
Thompson_38,
I think this is the exact answer to what you are trying to do.
http://radio.weblogs.com/0111551/sto...ItsOutput.html

--
in**@dowhileloop.com
http://dowhileloop.com website development
http://publicjoe.dowhileloop.com -- C# Tutorials

"thompson_38" <th*********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.

Nov 17 '05 #3

"thompson_38" <th*********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.
Nov 17 '05 #4

"thompson_38" <th*********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.
Nov 17 '05 #5

"Landi" <in**@dowhileloop.com> wrote in message
news:eH*************@TK2MSFTNGP12.phx.gbl...
Thompson_38,
I think this is the exact answer to what you are trying to do.
http://radio.weblogs.com/0111551/sto...ItsOutput.html

--


The sample in the link only works if you start the console application from
another C# program, which is not OP's scenario.

Willy.
Nov 17 '05 #6

"Landi" <in**@dowhileloop.com> wrote in message
news:eH*************@TK2MSFTNGP12.phx.gbl...
Thompson_38,
I think this is the exact answer to what you are trying to do.
http://radio.weblogs.com/0111551/sto...ItsOutput.html

--


The sample in the link only works if you start the console application from
another C# program, which is not OP's scenario.

Willy.
Nov 17 '05 #7
Thank you for the information, I had tried the
http://radio.weblogs.com/01115*51/st...Seco*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.

Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: xo55ox | last post by:
I am very new with php. And I want to find out how do I capture user cookies information for traffic analysis on Windows machine and server cookies from Linux server. thanks.
3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
4
by: Mariano Drago | last post by:
Hi there! Im been googling all the day, but i can't find a clue about how to do what i need... So, I need to write a win32 application that "trace" or "log" or "capture" all outgoing HTTP traffic...
5
by: TerryWilson | last post by:
I am developing a web based service tool using asp.net that we will distribute with our product. This service tool will be used for remotely configuring the product, problem determination, etc. ...
9
by: Hugh Janus | last post by:
Hi all, Does anybody know if it is possible with VB.NET to capture and redirect traffic that flows through a particular port? i.e. the app either listens or watches port 1234 for outgoing...
1
by: Rune Jacobsen | last post by:
Hi, I've been trying to figure this one out, but my experience just doesn't have what it takes... :| I am writing an application that reads an XML file and displays the contents in various...
4
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
I know how to capture a keypress for a windows application, but how would I go about doing it for a windows service? Rather than having a form in focus all the time, I would prefer to have...
2
by: Derrick | last post by:
Can anyone suggest a tool (if one exists) to capture IIS traffic and be able to "replay" that traffic? We are in the process of moving from sql2k to sql2005. What I would like to do is take a...
11
by: gustavo.samour | last post by:
Hi, I am writing a very basic raw ethernet sniffer based on what I found in Andreas Schaufler's raw ethernet article: http://aschauf.landshut.org/fh/linux/udp_vs_raw/ch01s03.html I'm trying...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.