JJ,
> > I've not been mentioning anything about writing data,
My apologies. Somehow for me your "async and overlapped I/O" translated to
it (as you could have noticed from the paragraph just below my statement).
> A mere async I/O is not enough, because you can only access
> the received data after all of the requested number of bytes are
> receved.
For the second part of that statement ? Untrue. I've mentioned how I
think I can tackle that problem a few times now (in two different ways), so
I fail to see why you now bring that problem up.
As for the first part ? I think I've made quite known that I'm after a
polling solution, not an interrupt-driven one.
... But if that is the *only* way it will work than you've actually proven
my point that the serial communications API doesn't actually provide the
tools to create *a* solution (as opposed to "a specific, effectivily
mandated" one). :-)
> A single threaded serial port application/library is a big mistake.
> Main reason is that it'll get buffer overflow easily.
Bull. That can happen regardles if app/lib is mutithreaded or not -- as a
result from not calculating the size of the buffer correctly (as a function
of the choosen baudrate and the read-cycle time) or not reading (enough)
data from the buffer in the time you allowed for it.
Even with a DCB's highest baudrate shown, 256000 bps, a buffer of a mere 256
KByte would give you a cycle-time of 10 seconds. That should be enough for
most situations, even polling ones.
> ClearComError() is a serial port error recovery function which
> can't be ignored.
I would have been *very* happy if it would be only that. :-(
But I do not understand you fully: A function *I* have to call, but "cannot
be ignored" ?
Or do you maybe mean that its an always needed function to keep the program
running ? In that case, I don't think so. At least, not for its "reset an
internal errorflag" part. There are, AFAICS, at least two other ways to get
that done.
> Multi thread is the key to get responsive program
I'm sorry, but that is not an answer to the question I asked I'm afraid. :-\
ippflwjk2vr0.1c62a8vlgs0el$.dlg@40tude.net...