|
|
1.1.1.2 ! root 1: Sample: using anonymous pipe to capture child process output 1.1 root 2: 3: Summary: 4: 5: The sample INHERIT demonstrates how to redirect standard 1.1.1.2 ! root 6: output and standard error to an anonymous pipe using two different ! 7: techniques: passing anonymouse pipe handles to the child in the ! 8: STARTUPINFO structure, and by setting anonymous pipe handles as the ! 9: standard handles with the SetStdHandle API and having the child ! 10: process inherit them. 1.1 root 11: 12: In the sample, a child process is started whose standard 13: output and standard error handles have been redirected to an 14: anonymous pipe. The parent reads out of this pipe and puts 15: the data to both the console and to a log file specified on 16: the command line. 17: 1.1.1.2 ! root 18: Additional reference words: 1.1 root 19: 20: CloseHandle CreateProcess ReadFile 1.1.1.2 ! root 21: CreateFile GetLastError CreatePipe ! 22: WriteFile
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.