473,396 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

EV_BREAK problem in NetSerialComm

I try using NetSerialComm at
http://msdn.microsoft.com/msdnmag/is...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?
Nov 17 '05 #1
0 1720

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: nchap99 | last post by:
hello, Does anybody know if Microsoft Dot Net supports the RS232 type of connection. As far as I know Visual basic 6 supports RS232 connection format. Thanks,
6
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many...
1
by: Chris | last post by:
Hi, I'm trying to find out if a serial communication dll exists that would allow me to communicate to devices connected on the com port through .net. My implementation language will be C#. I...
6
by: Peter Krikelis | last post by:
Hi All, I am having a problem setting up input mode for serial communications. (Sorry about the long code post). The following code is what I use to set up my comm port.
7
by: Will | last post by:
I'm working on a C# Windows Service that needs to monitor serial port communication. Because the .Net framework does not include support for serial communications, I've decided to use the...
1
by: Brian Henry | last post by:
does anyone have a class to interact with a com or lpt port? I need to be able to send hex codes through the data lines D1 - D8 on a LPT port... or D1-D4 on serial... i have seen classes in the...
6
by: Tico Tech | last post by:
Hi: I have a question about the Microsoft Communications Control Version 6.0 from visual studio .net. I have this code: Dim Buffer As String Do Buffer = AxMSComm1.Input() //Error, it does...
6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
3
by: David W. Rogers | last post by:
I am trying to use the software from John Hind's article: "Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications". When I use my application, everything works fine. I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.