Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
ASYNC_GETCOMMEVENT (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSDEVIOCTL
USHORT DosDevIOCtl(pfEvent, 0L, 0x0072, 0x0001, hDevice)
PUSHORT pfEvent; /* pointer to variable for events */
HFILE hDevice; /* device handle */
The ASYNC_GETCOMMEVENT function retrieves the communications event flags
from the internally maintained event word. After the function copies the
event flags to the specified variable, it clears the event word.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pfEvent Points to the variable that receives the event flags. This
variable can be a combination of the following values:
Value Meaning
─────────────────────────────────────────────────────────────────
CHAR_RECEIVED A character has been read from the serial-device
receive hardware and placed in the receive
queue.
LAST_CHAR_SENT The last character in the device-driver transmit
queue has been sent to the serial-device transmit
hardware. This does not mean there is no data to
send in any outstanding write requests.
CTS_CHANGED The clear-to-send (CTS) signal has changed
state.
DSR_CHANGED The data-set-ready (DSR) signal has changed
state.
DCD_CHANGED The data-carrier-detect (DCD) signal has changed
state.
BREAK_DETECTED A break has been detected.
ERROR_OCCURRED A parity, framing, or overrun error has occurred.
An overrun can be a receive hardware overrun or a
receive queue overrun.
RI_DETECTED The trailing edge of the ring indicator (RI) has
been detected.
hDevice Identifies the serial device that receives the device-control
function. The handle must have been created previously by using
the DosOpen function.
Return Value
The return value is zero if the function is successful or an error value if
an error occurs.
Comments
This function clears the event word only when it is successful. The event
word remains unchanged until the device is fully closed (there are no
outstanding open handles) and then reopened.
See Also
DosOpen, ASYNC_GETCOMMSTATUS, ASYNC_GETCOMMERROR
♦