You can use VCOMM services to configure a communications resource and initialize its receive and transmit queues. The _DCB (device control block) structure specifies the configuration settings for a communications resource - for example, the baud rate, the number of data bits per byte, and the number of stop bits per byte. Additional fields specify parity, handshaking options, and special characters used for handshaking or for signaling events.
When you open a communications resource, the port driver initializes it using a default configuration. You can determine the current configuration by calling the _VCOMM_GetCommState service, that fills in a _DCB structure. Before configuring the communications resource, you can determine which settings it supports by calling the _VCOMM_GetCommProperties service; this service fills in a _COMMPROP structure. To configure the communications resource, call the _VCOMM_SetCommState service.
To initialize the receive and transmit queues for a communications resource, call the _VCOMM_SetupComm service. The previous state of the receive queue is returned in the specified _QSB structure. If you do not call this service, the port driver uses default queues. The _COMMPROP structure specifies the default and maximum sizes of the receive and transmit queues. Note that port drivers for some devices, such as LPT ports, do not use queues.
_COMMPROP, _DCB, _QSB, _VCOMM_GetCommProperties, _VCOMM_GetCommState, _VCOMM_SetCommState, _VCOMM_SetupComm