Re: Reading Serial Port

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Jan 31, 3:15 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
The problem with reading stale data is that if you have filled up the buffer with old
data, then new data might not have space, and information will be discarded. By the time
you call PurgeComm, you might have already had the overflow, so that's why you see no
effect.

But... is this buffer managed by the S.O. (Windows)? To my knowledge,
I use no buffer except that "buffer" unsigned char variable where I
put every byte I read.
Why is this buffer plenty of data when I open the port?

By the time
you call PurgeComm, you might have already had the overflow, so that's why you see no
effect.
I use PurgeComm inmediately after I open the port, before myThread-
PostThreadMessage( UWM_START_READING );

Your simulation suggest is very interesting, if I don't found any more
errors I will test it. Until then I have a lot of work to do! ;)
Very thanks to all that reply that post.
.



Relevant Pages

  • Re: Reading Serial Port
    ... you call PurgeComm, you might have already had the overflow, so that's why you see no ... I use no buffer except that "buffer" unsigned char variable where I ... Another issue is the high CPU usage is doing the while. ...
    (microsoft.public.vc.mfc)
  • Buffer overflows in ircII-based clients
    ... I had been pretty sure for years that malicious servers can ... This means that these clients are safe when they're connected to standard ... buffer in stack if channel name is large enough. ... That alone can overflow the buffer. ...
    (Bugtraq)
  • [NEWS] Multiple IBM DB2 Vulnerabilities
    ... crash the server and run arbitrary machine code. ... IBM DB2 db2fmp buffer overflow: ... overly parameter to the db2fmp binary will overflow a stack based buffer. ...
    (Securiteam)
  • HP Radia Notify Daemon: Multiple Buffer Overflow Vulnerabilities
    ... HP Radia Notify Daemon: Multiple Buffer Overflow Vulnerabilities ... This RADEXECD component is a small server ... In a typical configuration this vulnerability may be ...
    (Bugtraq)
  • [Full-disclosure] HP Radia Notify Daemon: Multiple Buffer Overflow Vulnerabilities
    ... HP Radia Notify Daemon: Multiple Buffer Overflow Vulnerabilities ... This RADEXECD component is a small server ... In a typical configuration this vulnerability may be ...
    (Full-Disclosure)