Solved

WIN32- Capturing Console Output

Posted on 1998-04-15
2
365 Views
Last Modified: 2008-02-01
I need some sample code or detailed steps of a windowed application, launching a generic console application and the windowed application capturing the output of the child console program.  BTW, must handle both Windows 95 and NT 4.0 service pack 3.
0
Comment
Question by:rayb
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1184327
Take a look at the following two Microsoft KB articles.

How to Spawn a Console App and Redirect Standard Handles
http://support.microsoft.com/support/kb/articles/q126/6/28.asp

Redirection Issues on Windows 95 MS-DOS Apps and Batch Files
http://support.microsoft.com/support/kb/articles/q150/9/56.asp


You can also look into the following two samples.
Platform SDK Code Samples\WINBASE\IPC\INHERIT

Visual C++ Samples\MFC Samples\MFC Internet Samples\HTTPSVR: Demonstrates World Wide Web HTTP Server
(ReqSock.cpp - CGIThread() and CGIDone() functions)
0
 
LVL 2

Author Comment

by:rayb
ID: 1184328
Thanks a bunch Chensu!

The most helpful URL was:
http://support.microsoft.com/support/kb/articles/q150/9/56.asp

This had everything I needed, I was able to quickly create my own sample program from the code shown on the page.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Issue accessing member variable of atomic class 16 110
Getting IP address 8 71
How to split this in C++ 4 94
Least Squares Curve Fitting 4 61
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now