如何从CreateProcessWithLogonW获取标准输出? [英] How to get standard output from CreateProcessWithLogonW?

查看:51
本文介绍了如何从CreateProcessWithLogonW获取标准输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 http://www.pinvoke.net/default中的代码.aspx/advapi32.createprocesswithlogonw .如何从标准输出中以字符串形式获取输出?像在命令窗口中交互式运行时显示的内容一样?

I am using the code from http://www.pinvoke.net/default.aspx/advapi32.createprocesswithlogonw. How do I get the output from the standard output as a string? Like the stuff that shows up when you run it interactively in a command window?

推荐答案

此帖子已为我解决.不是输出部分,而是我使CreateProcessWithLogonW工作.

This post solved it for me. Not the output part but that I got CreateProcessWithLogonW working.

http://blogs.msdn.com/alejacma/archive/2007/12/20/how-to-call-createprocesswithlogonw-createprocessasuser-in-net.aspx

这篇关于如何从CreateProcessWithLogonW获取标准输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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