GetCommState

Syntax

int GetCommState(nCid,lpDCB)

This function fills the buffer pointed to by the lpDCB parameter with the device control block of the communication device specified by the nCid parameter.

Parameter Type/Description  

nCid int Specifies the device to be examined. The OpenComm function returns this value.  
lpDCB DCB FAR * Points to the DCB data structure that is to receive the current device control block. The structure defines the control setting for the device.  

Return Value

The return value specifies the outcome of the function. It is zero if the function was successful. If an error occurred, the return value is negative.