叶面打开的时候
string strExePath = HttpContext.Current.Server.MapPath(@"bin/ELEEYE.EXE");
Process p = new Process();
p.StartInfo.FileName = strExePath;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine("ucci");
p.StandardInput.WriteLine("setoption batch on");在staic Ajax方法里想要 p.StandardInput.WriteLine("position fen " + fen + " b - - 0 0");
p.StandardInput.WriteLine("go time 1000"); p.StandardInput.WriteLine("quit");
string re = p.StandardOutput.ReadToEnd();
p.Close();这样得不到那个p
用getProceeById((int)HttpContext.current.Session[pid])
也找不到。
winform下是可以的,webForm就不灵光了。AJAX象棋,效果见
http://www.dullwolf.cn/chess/如果上述问题能解决,我就可以做到后台思考了,不必每次请求都打开一次进程。
string strExePath = HttpContext.Current.Server.MapPath(@"bin/ELEEYE.EXE");
Process p = new Process();
p.StartInfo.FileName = strExePath;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine("ucci");
p.StandardInput.WriteLine("setoption batch on");在staic Ajax方法里想要 p.StandardInput.WriteLine("position fen " + fen + " b - - 0 0");
p.StandardInput.WriteLine("go time 1000"); p.StandardInput.WriteLine("quit");
string re = p.StandardOutput.ReadToEnd();
p.Close();这样得不到那个p
用getProceeById((int)HttpContext.current.Session[pid])
也找不到。
winform下是可以的,webForm就不灵光了。AJAX象棋,效果见
http://www.dullwolf.cn/chess/如果上述问题能解决,我就可以做到后台思考了,不必每次请求都打开一次进程。
解决方案 »
- WIN7 下安装.net SDK2.0 快速入门失败
- .net2.0添加上传文件大小控制配置节出错
- CKEditor 和 ckfinder 不知道什么情况下没有浏览服务器按钮和上传按钮.
- sql2000备份的.bak sql2005可以用吗?
- 我是新手,遇见一个问题,高手给看看
- asp.net 服务器 怎么 架设
- 我用 TREEVIEW做得菜单 和相关一些程序单是。。。。。。。。。。。。
- 连接access数据库 怎样从配置文件内连接ACCEss数据库
- CS0117: “shop.productDetail”并不包含“DataItem”的定义
- 如何实现dataset1+dataset2?
- 移动web 开发中,html显示不出来 ?
- 关于infoPath附件读取的问题
CPU:奔4酷瑞双核3.4G
内存:2G
硬盘:250G
共享百兆(机柜只有4台机器)。
怒江移动机房,南北双通,南北方速度都快
[email protected]价格可商量