如何从C#.net纠正VC ++控制台exe? [英] How to rectify VC++ console exe from C#.net?
本文介绍了如何从C#.net纠正VC ++控制台exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须手动在VC ++ console exe文件中运行。它工作正常,但需要从C#.net运行此exe文件。所以,我必须在以下代码中开发C#.net应用程序。它正在运行该exe文件,但有些事件无法正常工作....
C#.net代码:
I have to run in VC++ console exe file by manually. It is working fine, but need to run this exe file from C#.net. So, i have to developed the C#.net application in the following code. It is running that exe file but some events not working....
C#.net code:
string command = " -h";
System.Diagnostics.Process pRun;
pRun = new System.Diagnostics.Process();
pRun.EnableRaisingEvents = true;
pRun.StartInfo.FileName = @"D:\SMSServer\Srv.exe";
pRun.StartInfo.Arguments = command;
pRun.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
pRun.Start();
pRun.WaitForExit();
如何纠正这个问题?
How to rectify this issue?
推荐答案
这篇关于如何从C#.net纠正VC ++控制台exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文