This blog is a knowledge base...where I clip cool tricks and urls

Spawn like the IDE

clipped from www.codeproject.com
m_StopEvent.Reset();
string SpawnArgs = " -e " + m_StopEvent.Handle;
SpawnArgs += " \"" + Filename + "\" " + Arguments;
ProcessStartInfo Info = new ProcessStartInfo();
Info.FileName = "vcspawn.exe";
Info.Arguments = SpawnArgs;
Info.WorkingDirectory = "";
Info.CreateNoWindow = true;
Info.UseShellExecute = false;
Info.RedirectStandardOutput = true;
Info.RedirectStandardError = true;
Process Proc = Process.Start(Info);
m_StdOutReader = new RedirOutReader(Proc, Printer,
Proc.StandardOutput);
m_StdOutReader.Start();
m_StdErrReader = new RedirOutReader(Proc, Printer,
Proc.StandardError);
m_StdErrReader.Start();
m_StopWaiter = new ProcessStopWaiter(Proc, Printer,
Filename, DeleteAfterRun, m_StopEvent);
m_StopWaiter.Start();
 blog it

No comments: