GetCommError

int GetCommError(idComDev, lpStat)

int idComDev;

/* Communication device ID */

COMSTAT FAR *lpStat; /* Address of the device status buffer */

The GetCommError function is used to acquire the last error value and current status of the specified

device. If a communication error occurs, Windows will lock the communication port until the

GetCommError function cancels the error.

<Parameter >

idComDev: Specifies the communication device for which the status is to be checked.

The OpenComm function returns this value.

lpStat:

This is a pointer to the COMSTAT structure that receives the device status.

If this parameter is NULL, this function returns the error value.

<Return value >

If the function is terminated normally, the error value of the communication function which called

the specified device most recently is returned.

<Error values >

CE_BREAK

Indicates that the break state is detected. This functions if 9-Wire or 3-Wire

 

connection is established.

CE_CTSTO

Not supported.

CE_DNS

Not supported.

CE_DSRTO

Not supported.

CE_FRAME

Indicates that a framing error is detected. This functions if 9-Wire or 3-Wire

 

connection is established.

CE_IOE

Not supported.

CE_MODE

Not supported.

CE_OOP

Not supported.

CE_OVERRUN

Indicates that the previous character could not be read before the next character

 

was received. The previous character will be lost. This functions if 9-Wire or

 

3-Wire connection is established.

CE_PTO

Not supported.

CE_RLSDTO

Not supported.

CE_RXOVER

Not supported.

CE_RXPARITY

Indicates that a parity error is detected. This functions if 9-Wire or 3-Wire

 

connection is established.

117

Page 117
Image 117
Casio IT-2000W manual GetCommError, Error values