S
Shizuka
I try using NetSerialComm at
http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
However, In ReceiveThread(), it always cause IO Error [003a] Exception
and a dead-loop in ReadFile()
.......
if (errs == Win32Com.CE_BREAK)
{
eventMask |= Win32Com.EV_BREAK;
}
else
{
throw new CommPortException("IO Error [003a]"
+ " eventMask:" + eventMask.ToString() + " errs:" +
errs.ToString());
}
.......
do
{
gotbytes = 0;
if (!Win32Com.ReadFile(hPort, buf, 1, out gotbytes, unmanagedOv))
{
int x = Marshal.GetLastWin32Error();
throw new CommPortException("IO Error [004]");
}
if (gotbytes == 1) OnRxChar(buf[0]);
} while (gotbytes > 0);
......
I found it may be caused by EV_BREAK problem. Am I got any wrong
settings on something?
http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
However, In ReceiveThread(), it always cause IO Error [003a] Exception
and a dead-loop in ReadFile()
.......
if (errs == Win32Com.CE_BREAK)
{
eventMask |= Win32Com.EV_BREAK;
}
else
{
throw new CommPortException("IO Error [003a]"
+ " eventMask:" + eventMask.ToString() + " errs:" +
errs.ToString());
}
.......
do
{
gotbytes = 0;
if (!Win32Com.ReadFile(hPort, buf, 1, out gotbytes, unmanagedOv))
{
int x = Marshal.GetLastWin32Error();
throw new CommPortException("IO Error [004]");
}
if (gotbytes == 1) OnRxChar(buf[0]);
} while (gotbytes > 0);
......
I found it may be caused by EV_BREAK problem. Am I got any wrong
settings on something?