当前位置: 代码迷 >> ASP.NET >> 怎样实现在ASP.NET后台中调用其他程序解决方法
  详细解决方案

怎样实现在ASP.NET后台中调用其他程序解决方法

热度:2028   发布时间:2013-02-26 00:00:00.0
怎样实现在ASP.NET后台中调用其他程序
小弟想为学校做一个C/C++的编程擂台,,目标就是实现输入文本框的程序能够自动编译,通过编译的才能提交进入人工审核阶段,想用ASP.NET+C#来写,可不知道怎么调用外部编译程序(比如C的TCC.EXE)。请各位大侠赐教!小弟不胜感激!

------解决方案--------------------------------------------------------
System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo();

Info.FileName = "tcc.exe ";
Info.Arguments = "test.c ";//参数
System.Diagnostics.Process Proc ;

try
{
Proc = System.Diagnostics.Process.Start(Info);
}
catch(System.ComponentModel.Win32Exception e)
{
}
  相关解决方案