I have some code:
cmdProcess = new Process();
var procStartInfo = new ProcessStartInfo( "cmd", "/k "C:\\Program Files (x86)\\Far Manager\\Far.exe"" );
procStartInfo.RedirectStandardOutput = true;
procStartInfo.RedirectStandardInput = true;
procStartInfo.UseShellExecute = false;
procStartInfo.CreateNoWindow = true;
cmdProcess.OutputDataReceived += ( s, e ) => {
callbackFn(e.Data + "\n");
};
cmdProcess.StartInfo = procStartInfo;
cmdProcess.Start();
cmdProcess.BeginOutputReadLine();
But with this code I only can launch the process and get something, but not completely and not color. Also I tried the ReceiveConsoleOutput function and I receive only blank buffer.
With WinAPI i can only start console and nothing else - I don't understand it well. But I'm not against WinAPI examples, because i think that my problem may be solved with it.
I would be grateful if anyone can help me.
P.S. I'm sorry for bad english.