Solved

WIN32- Capturing Console Output

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

738 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