File:  [WindowsNT SDKs] / q_a / samples / inherit / readme.txt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:30:09 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntsdk-nov-1993, ntsdk-jul-1993, HEAD
Microsoft Windows NT Build 511 (SDK Final Release) 07-24-1993

Sample: using anonymous pipe to capture child process output

Summary:

The sample INHERIT demonstrates how to redirect standard
output and standard error to an anonymous pipe using two different
techniques: passing anonymouse pipe handles to the child in the
STARTUPINFO structure, and by setting anonymous pipe handles as the
standard handles with the SetStdHandle API and having the child
process inherit them.

In the sample, a child process is started whose standard
output and standard error handles have been redirected to an
anonymous pipe. The parent reads out of this pipe and puts
the data to both the console and to a log file specified on
the command line.

Additional reference words:

   CloseHandle    CreateProcess  ReadFile       
   CreateFile     GetLastError   CreatePipe     
   WriteFile      

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.