K
korayk
i am trying to use this SerialPort component of .NET 2.0 framework in a
very simple windows application and i am getting following exceptions:
A first chance exception of type 'System.ArgumentOutOfRangeException'
occurred in System.dll
A first chance exception of type 'System.IO.IOException' occurred in
System.dll
with the exception message:
Message="The I/O operation has been aborted because of either a thread
exit or an application request."
in the code, i use an eventhandler to receive incoming data as follows:
private void Form1_Load(object sender, EventArgs e)
{
serialPort1.DataReceived += new
SerialDataReceivedEventHandler(serialPort_DataReceived);
}
private void serialPort_DataReceived(object sender,
SerialDataReceivedEventArgs e)
{
textBoxReceived.Text = serialPort1.ReadLine();
}
as i have said, it is very simple and fundemantal. although i checked
every property of my comm port etc., i could not find the reason.
would be grateful for any kind of help...
very simple windows application and i am getting following exceptions:
A first chance exception of type 'System.ArgumentOutOfRangeException'
occurred in System.dll
A first chance exception of type 'System.IO.IOException' occurred in
System.dll
with the exception message:
Message="The I/O operation has been aborted because of either a thread
exit or an application request."
in the code, i use an eventhandler to receive incoming data as follows:
private void Form1_Load(object sender, EventArgs e)
{
serialPort1.DataReceived += new
SerialDataReceivedEventHandler(serialPort_DataReceived);
}
private void serialPort_DataReceived(object sender,
SerialDataReceivedEventArgs e)
{
textBoxReceived.Text = serialPort1.ReadLine();
}
as i have said, it is very simple and fundemantal. although i checked
every property of my comm port etc., i could not find the reason.
would be grateful for any kind of help...