Using a handle to collect output from CreateProcess()

南笙酒味 提交于 2019-12-03 11:25:40

Microsoft has an example in its knowledge base that demonstrates how to capture the output of a child console process. The basic principle is that the parent process creates pipes (one per standard handle to redirect) and passes the handles to CreateProcess.

The child process does not need to be modified for this to work, which is important if you do not have control over the child's source.

More information: How to spawn console processes with redirected standard handles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!