使用的ShellExecuteEx和输入/输出捕捉标准/ ERR [英] Using ShellExecuteEx and capturing standard in/out/err

查看:191
本文介绍了使用的ShellExecuteEx和输入/输出捕捉标准/ ERR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有使用的ShellExecuteEx和捕捉标准的方式输入/输出/犯错?

I'm using ShellExecuteEx to execute a command in C. Is there a way to use ShellExecuteEx and capture standard in/out/err?

请注意:我不想用的CreateProcess

Note: I don't want to use CreateProcess.

推荐答案

正如pilif和Bob提到的,你需要使用的CreateProcess。

As mentioned by pilif and Bob, you need to use CreateProcess.

如果您想code,它都结束了你,我必须在这个问题的确切类:

If you want code that wraps it all up for you, I do have a class for this exact issue at:

的http:// code。 google.com/p/kgui/source/browse/trunk/kguithread.cpp

类(kGUICallThread)处理的Linux / MAC /和Windows版本。在code为LGPL许可

The class ( kGUICallThread ) handles linux / mac / and windows versions. The code is licensed LGPL.

这篇关于使用的ShellExecuteEx和输入/输出捕捉标准/ ERR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆