从MFC运行控制台应用程序并获取输出 [英] Running a Console App from MFC and Grabing the Output
本文介绍了从MFC运行控制台应用程序并获取输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个MFC GUI应用程序,我想从中运行另一个控制台,获取一些控制台参数,在其输入上编写并以字符串形式获取输出.有可能吗?
我已经在CodeProject上找到本文 [
Hi,
I have a MFC GUI application from which I''d like to run another console one, get it some console arguments, write on its input and grab the output as string. Is that possible?
I''ve found this article here on CodeProject[^], but have no idea how to extend it for standard input and output.
Thanks
推荐答案
如果仔细看一下文章,您会发现控制台应用程序的输入和输出是使用管道传输的,因此似乎符合您的要求.
If you look carefully at the article you will see that the input and output of the console application are transferred using pipes, so it would seem to fit your requirements.
这篇关于从MFC运行控制台应用程序并获取输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文