Solved

WIN32- Capturing Console Output

Posted on 1998-04-15
2
364 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

747 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

11 Experts available now in Live!

Get 1:1 Help Now