RedirectStandardInput crashes program

the following code is to open a console application (which uses pdcurses for output, nothing special):

  myProcess.StartInfo.FileName = "some.exe";
  myProcess.StartInfo.UseShellExecute = false;
  myProcess.StartInfo.CreateNoWindow = false;
  myProcess.StartInfo.RedirectStandardInput = true;
  myProcess.Start();

The Problem is that it opens the designated window but directly closes it (it's barely visible). Starting the program without RedirectStandardInput works. The problem is that it does not throw an exception nor any error-message. What is wrong with my code? How can I write input to the program? Thanks.

Answers


Is some.exe a console program?

You could try starting cmd.exe with the /K switch and pass your some.exe as the argument to it.


Need Your Help

how do i access my cisco router details from ios mobile

ios api mobile dll router

Is it possible to access my Cisco router details like Name,Model,IP Address,Connection status etc from my iOS mobile.

Struts + Spring + Hibernate integration

java hibernate spring struts

For example, we have the next bunch: Struts, Spring, Hibernate. Can you help me understand the role played by each of the elements?