BOOL GetCommModemStatus(hCommDev, lpdwModemStats) | |||||
HANDLE hCommDev; | /* identifies the comm device | */ | |||
LPDWORD lpdwModemStats; | /* address of control-register values | */ |
The GetCommModemStatus function retrieves modem control-register values.
hCommDev
Specifies the communications device to query for modem control register values. The CreateFile function returns this value.
lpdwModemStats
Points to a variable to be filled with the modem control-register values. This parameter can be a combination of the following values:
Value | Meaning |
MS_CTS_ON | Clear To Send signal is on. |
MS_RING_ON | Ring Indicator signal is on. |
MS_RLSD_ON | Receive Line Signal Detect signal is on. |
MS_DSR_ON | Data Set Ready signal is on. |
The return value is TRUE if the function was successful, or FALSE if an error occurred (or if the hardware does not support the control-register values). Use the GetLastError function to obtain extended error information.