include vcomm.inc _DCB STRUC DCBLength DD ? ;size of the structure, in bytes BaudRate DD ? ;see below BitMask DD ? ;see below XonLim DD ? ;see below XoffLim DD ? ;see below dwReserved DW ? ;reserved ByteSize DB ? ;data bits per character (4-8) Parity DB ? ;see below StopBits DB ? ;see below XonChar DB ? ;XON character for transmit and receive XoffChar DB ? ;XOFF character for transmit and receive ErrorChar DB ? ;parity-error replacement character EofChar DB ? ;character used to signal the end of data EvtChar1 DB ? ;event-generating character EvtChar2 DB ? ;additional event character bReserved DB ? ;reserved; do not use RlsTimeout DD ? ;max. milliseconds to wait for RLSD CtsTimeout DD ? ;max. milliseconds to wait for CTS DsrTimeout DD ? ;max. milliseconds to wait for DSR TxDelay DD ? ;milliseconds between transmission of chars _DCB ENDS
Defines the control settings for a communications resource.
BaudRate
Baud rate or baud rate index. Can be one of these values:
CBR_110 | CBR_4800 | CBR_56000 |
CBR_300 | CBR_9600 | CBR_128000 |
CBR_600 | CBR_14400 | CBR_256000 |
CBR_1200 | CBR_19200 | |
CBR_2400 | CBR_38400 |
BitMask
Communications options. Can be one or more of these values:
Value | Meaning |
fBinary | Specifies binary mode. In binary mode, the character specified by the EofChar field is not recognized as ending the data stream. |
fCh1Evt | Specifies that reception of the character specified by the EvtChar1 field signals an event. |
fCh2Evt | Specifies that reception of the character specified by the EvtChar2 field signals an event. |
fDtrDisable | Disables the DTR line. If this flag is specified, DTR is disabled when the device is opened, and remains disabled. Otherwise, DTR is enabled when the device is opened and remains enabled. |
fDtrflow | Enables DTR handshaking for input. If this flag is set, DTR is turned off when the XOFF limit is reached and is turned back on when the XON limit is reached. |
fEnqAck | Enables enquiry (ENQ)/acknowledgment (ACK) handshaking. |
fEtxAck | Enables end-of-text (ETX)/acknowledgment (ACK) handshaking. |
fInX | Enables XON/XOFF handshaking for input. If this flag is set, the XOFF character is sent when the XOFF limit is reached, and the XON character is sent when the XON limit is reached. |
fNull | Specifies that received null characters are to be discarded. |
fOutX | Enables XON/XOFF handshaking for output. If this flag is set, transmission is suspended when the XOFF character is received, and resumes when the XON character is received. |
fOutxCtsFlow | Enables CTS handshaking for output. If this flag is set, transmission is suspended whenever CTS is off. |
fOutxDsrFlow | Enables DSR handshaking for output. If this flag is set, transmission is suspended whenever DSR is off. |
fParity | Enables parity checking. |
fPeChar | Enables parity error replacement. If set, characters received with parity errors are replaced with the character specified by the ErrorChar field. |
fRtsDisable | Disables the RTS line. If this flag is specified, RTS is disabled when the device is opened, and remains disabled. Otherwise, RTS is enabled when the device is opened and remains enabled. |
fRtsflow | Enables RTS handshaking for input. If this flag is set, RTS is turned off when the XOFF limit is reached and is turned back on when the XON limit is reached. |
XonLim
The XON limit. If input handshaking is enabled, handshaking signals (for example, the XON character) are sent when the number of characters in the receive queue falls below this value.
XoffLim
The XOFF limit. If input handshaking is enabled, handshaking signals (for example, the XOFF character) are sent when the number of free bytes in the receive queue falls below this value.
Parity
The type of parity to perform on input and output: NOPARITY, ODDPARITY, EVENPARITY, MARKPARITY, or SPACEPARITY.
StopBits
Specifies the number of stop bits: ONESTOPBIT, ONE5STOPBITS, or TWOSTOPBITS.
See also _VCOMM_GetCommState, _VCOMM_SetCommState