是否有可能得到一个程序的运行时的输出? [英] Is it possible to get the output of a program while it's running?
本文介绍了是否有可能得到一个程序的运行时的输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有一个用c ++编写的Windows控制台程序,是否可以在程序运行时检索程序的标准输出?如果没有,什么是最好的方法来重写程序?我知道我可以输出到文件,并不断检查这些文件的更新。还有别的办法吗?有没有更好的方法?
If I have a windows console program written with c++, is it possible to retrieve that program's standard output, while the program is running? And if not, what would be the best way to rewrite the program? I know I could output to files and continuously check those files for updates. Is there another way? Is there a better way?
推荐答案
Code Project中有一些有趣的文章:
There are some interesting articles in Code Project:
- CommandLineHelper (C#)
- 重定向任意控制台的输入/输出< a>(MFC / C ++)
- 通用控制台重定向(MFC / C ++)
- CommandLineHelper (C#)
- Redirecting an arbitrary Console's Input/Output (MFC/C++)
- Universal Console Redirector (MFC/C++)
这篇关于是否有可能得到一个程序的运行时的输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文