INtime SDK Help
GetCommModemStatus (Serial Communications)
INtime SDK v6 > About INtime > Networking and I/O > Serial Communications (COMM) > GetCommModemStatus (Serial Communications)

Retrieves modem control-register values.

BOOLEAN GetCommModemStatus(
  COMMHANDLE hComm,        // handle to communications device
  LPDWORD lpModemStat      // control-register values
);

Parameters

hComm
[in] Handle to the communications device. OpenComm returns this handle.
lpModemStat
[out] Pointer to a variable that specifies the current state of the modem control-register values. This parameter can be one or more of the following values:
Value Description
MS_CTS_ON The CTS (clear-to-send) signal is on.
MS_DSR_ON The DSR (data-set-ready) signal is on.
MS_RING_ON The ring indicator signal is on.
MS_RLSD_ON The RLSD (receive-line-signal-detect) signal is on.

Return Values

Non-zero
Success.
0 (zero)
Failure. To determine the status, call GetLastRtError.

Status

E_DISCONNECTED
COMM channel is closed
E_PARAM
Invalid parameter

Remarks

GetCommModemStatus is useful when you are using WaitCommEvent to monitor the CTS, RLSD, DSR, or ring indicator signals. To detect when these signals change state, use WaitCommEvent and then use GetCommModemStatus to determine the state after a change occurs.

If the hardware does not support the control-register values, the function fails.

Requirements

Versions Defined in Include Link to
INtime 3.1 intime/rt/include/comm.h comm.h comm.lib
See Also