Microsoft KB Archive/118625

{|
 * width="100%"|

INFO: Detecting Data on the Communications Port

 * }

Q118625

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * Microsoft Windows NT Server versions 3.5, 3.51, 4.0
 * Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0
 * Microsoft Windows 95
 * the operating system: 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 kbOSWin2000 kbDSupport kbGrpDSKernBase kbSerial

Issue type : kbinfo

Technology : kbAudDeveloper kbWin32sSearch kbWin32API