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_TRANSMITIMM (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSDEVIOCTL
USHORT DosDevIOCtl(0L, pbChar, 0x0044, 0x0001, hDevice)
PBYTE pbChar; /* pointer to character */
FILE hDevice; /* device handle */
The ASYNC_TRANSMITIMM function transmits the specified byte immediately.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pbChar Points to the character to be transmitted.
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
The device driver queues the character as the next character to be
transmitted even if there are already characters in the transmit queue.
If automatic-receiving control is enabled, an XON or XOFF character may be
transmitted before the requested character.
The function always returns before the character is actually transmitted.
If a character is already waiting to be transmitted immediately, the
function returns an error. The ASYNC_GETCOMMSTATUS function (0x0001,0x0064)
can be used to determine whether a character is currently waiting to be
transmitted immediately.
The device driver will not immediately transmit the character that is
waiting to be transmitted immediately if the device driver is not
transmitting characters due to modem-control signal-output handshaking or if
the device driver is currently transmitting a break.
If the device driver is not transmitting characters due to automatic
transmission or receiving control (XON/XOFF) being enabled or due to
operating as if an XOFF character had been received, the device driver still
transmits a character that is waiting to be transmitted immediately due to
this request. An application that requests that the device driver transmit a
character immediately if automatic transmission or receiving control is
enabled may cause unexpected results to happen to the communications line
flow control protocol.
This function is generally used to manually send XON and XOFF characters.
The character waiting to be transmitted immediately is not considered part
of the device driver transmit queue and is not flushed due to a flush
request. XON/XOFF characters that are automatically transmitted due to
automatic-receiving control may or may not be placed ahead of the character
waiting to be transmitted immediately. Applications should not be dependent
on this ordering.
See Also
DosOpen, ASYNC_GETCOMMSTATUS
♦