468,170 Members | 1,945 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,170 developers. It's quick & easy.

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 2302
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by paul koelle | last post: by
1 post views Thread by Gerrit Hulleman | last post: by
3 posts views Thread by Pawel Kruczynski | last post: by
9 posts views Thread by Fuzzyman | last post: by
8 posts views Thread by Morpheus | last post: by
18 posts views Thread by praetor.michael | last post: by
41 posts views Thread by amygdala | last post: by
4 posts views Thread by damiensawyer | last post: by
reply views Thread by kamranasdasdas | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.