http://codeguru.earthweb.com/misc/redirect.shtml You can specify a console for console application so that it doesn't create a new console as it runs. Related API:AllocConsole, CreateProcess. Or you can redirect their output to somewhere else in order to solve your problem. Hope the following links are useful to you. http://codeguru.earthweb.com/console/QuickWin.shtml
我想吧我调用的DOS 程序输出截取下来,有什么办法?不要告诉我输出到文件啊。
你可以把console程序的输出用SetStdHandle()重定向到另一个Handle中去
You can specify a console for console application so that it doesn't create a new console as it runs. Related API:AllocConsole, CreateProcess.
Or you can redirect their output to somewhere else in order to solve your problem. Hope the following links are useful to you.
http://codeguru.earthweb.com/console/QuickWin.shtml
看这个绝对满足要求。
我用CreatePipe创建了hReadPipe, hWritePipe,然后传入CreateProcess创建的进程,好像不能接收到啊。
有没有人用过?