INFO: Detecting Data on the Communications Port

ID: Q118625


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows NT versions 3.5, 3.51, 4.0
    • Microsoft Windows 95
    • Microsoft Windows 2000


SUMMARY

To detect whether there is any data available on the communications (COM) port without calling ReadFile(), use the ClearCommError() API. The field COMSTAT.CbInQue contains the number of bytes not yet read by a call to ReadFile().

Additional query words: 3.10 3.50

Keywords : kbAPI kbCommPort kbKernBase kbWinOS2000 kbDSupport kbGrpKernBase kbSerial
Version : winnt:3.5,3.51,4.0
Platform : winnt
Issue type : kbinfo


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.