473,803 Members | 3,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2510
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
RedirectStandar dOutput, 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**********@g mail.com> wrote in message
news:11******** *************@g 43g2000cwa.goog legroups.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
4802
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 client, or acting as a proxy. I started with a modified version of TinyHTTPProxy postet by Suzuki Hisao somewhere in 2003 to this list and tried to extend it to my needs. It works quite well if I configure my client to use it, but using iptables...
1
2269
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); The proces must run another program where the input for this external program is allready present in memory of the original proces.
3
3709
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
1497
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 are redirecting to somewhere that doesn't exist. Worse, if you do type it correctly, but then later the page name changes or the page moves, you still won't find out until run time. I have a framework that solves this problem and guarantees,...
9
1770
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 that could import sys afterwards - so I don't want to make the change in the sys module.
8
5791
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 technically create an executable that calls the function and then using a command prompt call the exexutable using the > output.txt redirector but I would prefer to do everything within the application itself. Is there a way for force an output...
18
9263
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 having is that none of the messages sent to stderr from the DLL are getting written to the file but if I write to stderr from the console application it gets written to the file no problem. Any ideas??
41
3254
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 resolve this issue once and for all now. The problem might be PHP related but since I only develop applications using PHP, I'm not a hundred percent sure. Therefor I've taken the liberty to crosspost to comp.lang.php and alt.www.webmaster. I...
9
1947
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 error website process the querystring and displays a nicely formatted error message with details. The problem I am having is that the querystrings are getting too long and I am unable to successfully redirect to the error site. What are my...
4
2805
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 book. For some reason, it's not working. Can someone please tell me what I'm doing wrong? Thanks in advance,
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.