I'm trying to intercept the content from a redirect port (Redmon) to a C# application so I can process it. Right now I'm just trying to figure out how to pass the output into my app.. I thought I could just input it through std input, but its not working. In a coomand line I can pipe text into my application and it works, but if I try to print through a redmon port, my application doesn't seem to take the input. I set up Redmon to let my application handle the output. Here's my code and a 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();
}
}
}
I;m only tryint to pass text to the application also. So so the process i'm using is winprint and set to text.
Thanks