Jump to content

ASYNC_GETCOMMSTATUS

From EDM2
(Redirected from ASYNC GETCOMMSTATUS (64h))

This function returns the COM status.

Category
IOCTL_ASYNC (01h)
Function
ASYNC_GETCOMMSTATUS (64h)

Parameter Packet Format

None. Packet pointer must be NULL.

Data Packet Format

Field Length C Datatype
COMM Status Byte BYTE UCHAR
COMM Status Byte
If equal to 1, the condition is TRUE. If equal to 0, the condition is FALSE.
Bit 0 : Transmit status (Tx) waiting for CTS to be turned on. See Note 3 of ASYNC_SETDCBINFO.
Bit 1 : Tx waiting for DSR to be turned on. See Note 3 of Function 53h.
Bit 2 : Tx waiting for DCD to be turned on. See Note 3 of Function 53h.
Bit 3 : Tx waiting because XOFF received. Behaves as if XOFF received (Function 47h). See Note 2 of Function 53h.
Characters are transmitted immediately (Function 44h). When the device driver is in this state, it automatically transmits XONs and XOFFs due to Automatic Receive Flow Control.
Bit 4 : Tx waiting because XOFF transmitted. See Note 2 of Function 53h.
Characters are still transmitted immediately. When the physical device driver is in this state, it automatically transmits XONs due to Automatic Receive Flow Control.
Bit 5 : Tx waiting because break being transmitted. See ASYNC_SETBREAKON.
Bit 6 : Character waiting to transmit immediately. See ASYNC_TRANSMITIMM.
Bit 7 : Receive waiting for DSR to be turned on. See Note 4 of Function 53h.

Transmit status (Tx) indicates why transmission might not occur, regardless of whether there is data to transmit. However, in order for the status to reflect that the physical device driver is waiting for a given condition, the device driver must be enabled for that condition.

For example, 00000001 indicates that the physical device driver has put receive characters in the physical device driver receive queue and is not waiting to transmit a character immediately (Function 44h). Characters are not transmitted from the physical device driver transmit queue when using CTS for output handshaking because CTS does not have the proper value.

Returns

If the call is made with an invalid Parameter Packet value, a general failure error is reported and valid information is not returned in the Data Packet.

Remarks

If a general failure error is not returned, the physical device driver returns the COM device current status.