473,626 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Capturing standard output of the process run from my app

Hello.

I’m trying to capture standard output of the other process which is
launched from my win app. I tried to do it with freopen function which
captured content of the printf functions, but not the output of the other
processes (even if it used printf function and launched with system function).

How can I perform my task?
How should I run other processes?

Thanks for suggestions.

Mar 9 '06 #1
1 1274
"Ivan" <Iv**@discussio ns.microsoft.co m> wrote in message
news:8F******** *************** ***********@mic rosoft.com...
I'm trying to capture standard output of the other process which is
launched from my win app. I tried to do it with freopen function which
captured content of the printf functions, but not the output of the other
processes (even if it used printf function and launched with system
function).

How can I perform my task?
How should I run other processes?


The usual advice would have your parent process creating "pipes" which are
used as the child's standard input and/or output devices. The child
unknowingly writes its output to a pipe. The parent reads from the pipe and
displays, parses, analyzes it as necessary. Details are here:

http://support.microsoft.com/?id=190351

Regards,
Will
Mar 9 '06 #2

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

Similar topics

2
4352
by: Hoegje | last post by:
I am writing a C++ program, which should create a sub- process to start a telnet session to another server. Then it should login to that server (on the telnet login) and execute one or more command(s) on the remote server. The C++ program provides all the input for this process (username, password, servername, commands, ...) and should capture all the output returned by the telnet session process inside some variable. How can this be...
1
5376
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my application (VB.NET) will start a process, redirect its stdout and capture that process' output, displaying it in a window. I've written a component for this, and a test application for the component. It allows me to specify a command to execute,...
2
1423
by: Harikumar G | last post by:
Friends, I have a C# console application for verifying a signature of an encrypted, this is done thru the Process.Startinfo method, My dos application for the decryption is gpg.exe (gnupgi) When I tried from the dos prompt the folloing output received: ------------------------------------------------------------------------
2
2476
by: Brian | last post by:
I'm running a dos program via System.Diagnostics.Process. The dos program is very picky about filenames and such, and so I want to show the output to the user so they can verify it did what it was supposed to do. When I create my process like this it doesn't redirect the standard output: Process prcs = new Process(); prcs.StartInfo.UseShellExecute = false;
3
1227
by: iforsyth | last post by:
Hi. Running an app with System.Diagnostics.Process process with: Sample code: myproc = New System.Diagnostics.Process() strPgm = "myapp.exe" strArgs = "" myproc.StartInfo = New
1
1231
by: Marcel | last post by:
Hi, I used the following code Jochen Kalmbach suggested to run an external program: System::Diagnostics::ProcessStartInfo *si = new System::Diagnostics::ProcessStartInfo(); si->UseShellExecute = false; si->WorkingDirectory = S"D:\\Promela\\"; si->FileName = "D:\\Promela\\PAN.exe";
5
2203
by: Luigi | last post by:
Hi to all! I'd like to execute an external program capturing the stdout/stderr messages at "real-time". I mean that I don't want to wait for the end of the process. If I write a code like this: import os import sys class Runner:
6
2260
by: Ed Leafe | last post by:
I've been approached by a local business that has been advised that they need to start capturing and archiving their instant messaging in order to comply with Sarbanes-Oxley. The company is largely PC, but has a significant number of Macs running OS X, too. Googling around quickly turns up IM Grabber for the PC, which would seem to be just what they need. But there is no equivalent to be found for OS X. So if anyone knows of any such...
1
2499
by: Elpoca | last post by:
Hi: I am trying to capture std output from a console application and redirect it to a textbox. The code below works the first time the process is started, but on subsequent starts it fails to capture the output (the process definitely runs every time). What am I doing wrong? namespace WindowsApplication1 {
0
8262
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7192
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
6122
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
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
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
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2623
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
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.