I used Process() to execute a external file named "test.exe".
The "test.exe" only prints a string. "abc \n \r xyz\n"
My goal is to get the string and turn each byte to corresponding ASCII code.
That is, I expect the outputs in my c# console are as below, 97 98 99 32 10 32 13 32 120 121 122 10
But when I used BeginOutputReadLine to get the output of test.exe, \n and \r were striped.
As a result, I only got 97 98 99 32 32 32 120 121 122
Finally, I don't want to use synchronized ways like Read, ReadLine, and ReadToEnd. Is there any way to get what I want??
Thanks!
Actually, I create a backgroundWorker to deal with external process test.exe I have a proc_DataReceived and backgroundWorker_Build_ProgressChanged...
the related code as below
http://codepad.org/Gmq1XqXb
all code as below
http://codepad.org/k7VpWynu
(I'm new to stackoverflow. I pasted my code in codepad.org before finding out how to format code here.)