Solved

WIN32- Capturing Console Output

Posted on 1998-04-15
2
373 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

726 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