I am trying to intercept content from a redirect port (Redmon) into a C # application so that I can handle it. Right now, I'm just trying to figure out how to pass the output to my application. I thought I could just enter it through the std input, but it does not work. In the coomand line, I can pass text to my application and it works, but if I try to print through the redmon port, my application does not seem to accept the input. I configured Redmon so that my application handles the output. Here is my code and screen shot of the printer port settings.
namespace titoprint { class Program { static void Main() { int result; while ((result = Console.Read()) != -1) { Console.WriteLine("{0} = {1} ", result, (char)result); } Console.WriteLine("in console"); MessageBox.Show("ok done!"); Console.ReadLine(); } } }
` Port Settings
I; m just tryint to pass text to the application as well. So the process that I use is winprint and is text tuned.
thanks
source share