Getting the state of a serial ports CTS pin

Hi,
After using WaitCommEvent to get a EV_CTS event, how can I retrieve the 'actual' state of the cts input pin?

Thanks
dsch
LVL 1
dschAsked:
Who is Participating?
 
mokuleConnect With a Mentor Commented:
The GetCommModemStatus function retrieves modem control-register values.


BOOL GetCommModemStatus(
  HANDLE hFile,
  LPDWORD lpModemStat
);

Parameters
hFile

[in] Handle to the communications device. The CreateFile function 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 Meaning
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.

0
 
dschAuthor Commented:
Cheers,
Got that working straight away, Thanks for your help.
Kind Regards
David S
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.