473,386 Members | 1,798 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,386 software developers and data experts.

Redirecting standard-output of current process

Hi !
Is there any way to redirect the standard-outputstream or
standard-errorstream of the currently running process ? I know that i can
spawn a new process and redirect its standard-outputstream or
standard-errorstream, but i need access to the streams of the CURRENT
process as this one interops with a selfmade COM-Server, that uses an old
third-party (compiled!!!) library, that is printing (Error)Messages to
stderr/stdout. Is this possible anyway ?

regards
Max
Jul 21 '05 #1
2 2488
take a look at the .Net Process class, there are many methods for
getting hold of the process (you can use the process ID),

Once you have a reference to the process, the process class has the
following properties which will interest you
StandardInput
StandardOutput
StandardError

Jul 21 '05 #2
Yes, i know these properties, but for using these you have to set
RedirectStandardOutput, etc. to true in the processes startup-info. Problem
is, i have no startup-info for my program´s process, as it is started by the
system and not as a child process...
thanx anyway !

<ga**********@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
take a look at the .Net Process class, there are many methods for
getting hold of the process (you can use the process ID),

Once you have a reference to the process, the process class has the
following properties which will interest you
StandardInput
StandardOutput
StandardError

Jul 21 '05 #3

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

Similar topics

3
by: paul koelle | last post by:
Hi list, My ultimate goal is to have a small HTTP proxy which is able to show a message specific to clients name/ip/status then handle the original request normally either by redirecting the...
1
by: Gerrit Hulleman | last post by:
Is it possible to redirect the standard input for an external application? Something like: ifstream in (...); std::streambufx oldbuf = cin.rdbuf(in.rdbuf()); system(...); cin.rdbuf(oldbuf); ...
3
by: Pawel Kruczynski | last post by:
did any know how redirect standard cout to edit in dialog window? i work in ms vc++ and i don't want use mfc. please help.. sorry for my poor english
4
by: Greg Smalter | last post by:
Redirecting from page to page within a web project is pretty easy. However, all Redirect methods take strings as arguments, as if you mistype the string, you don't find out until run time that you...
9
by: Fuzzyman | last post by:
Hello, I'm trying to redirect standard out in a single namespace. I can replace sys.stdout with a custom object - but that affects all namespaces. There will be code running simultaneously...
8
by: Morpheus | last post by:
I am trying to test a function that outputs text to the standard output, presumably using a cout call. I do not have access to the source, but need to test the output. Is this possible? I can...
18
by: praetor.michael | last post by:
I have a DLL written in C that writes to stderr. I have a win32 console application that makes calls to the DLL. In the console app I redirect stderr to a file using freopen. The problem I'm...
41
by: amygdala | last post by:
Hello all, I have posted a similar question in comp.lang.php in the past, but haven't had any response to it then. I kinda swept the problem under the rug since then. But I would really like to...
9
by: joe | last post by:
Hello, I have a website set up on our server that is especially for errors. When another website encounters an error, it will redirect to this site with error details in the querystring. The...
4
by: damiensawyer | last post by:
Hi, I'm trying to do something in global.asax that I would have thought to be quite simple. Basically, any request at all should get sent to another page. I actually got the code below from a...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.