Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!bywater!acheron!archet!larouch!news From: yozzo@larouch.UUCP (Ralph Yozzo) Newsgroups: comp.os.os2 Subject: Re: Is there a way to peek ahead and see how many bytes are in the COM buffer? Message-ID: <1989Dec25.025130.27715@larouch.uucp> Date: 25 Dec 89 02:51:30 GMT References: <1989Dec24.103004.26003@larouch.uucp> Sender: news@larouch.uucp (Usenet News Program) Organization: Larouch Headquarters Lines: 20 From article <1989Dec24.103004.26003@larouch.uucp>, by yozzo@larouch.uucp (Ralph Yozzo): > > Does anyone know of a way to peek ahead and see how many bytes are in > the COM1 buffer? > The reason I ask is that I'd like to read as many bytes > as possible from the COM port and I'd rather > not ask for too much because the DosRead() will block. > To answer my own question, there is a DosDevIOCtl() call that gives the number of characters in the receive queue. The call is documented in the I/O Subsystems and Device Drivers Volume 1 page 7-34 Category 1- Function 68H ------------------------------------------------------------------------------ | Ralph E. Yozzo | | | Arpanet: yozzo@ibm.com | | | Bitnet: yozzo@yktvmx.bitnet \---------------------------------------| | Home: ..!uunet!bywater!acheron!larouch!yozzo | Phone: (914) 945-3634 work | | | Phone: (914) 564-4731 home | ------------------------------------------------------------------------------