Solved

Getting the state of a serial ports CTS pin

Posted on 2004-04-03
2
662 Views
Last Modified: 2013-12-03
Hi,
After using WaitCommEvent to get a EV_CTS event, how can I retrieve the 'actual' state of the cts input pin?

Thanks
dsch
0
Comment
Question by:dsch
2 Comments
 
LVL 17

Accepted Solution

by:
mokule earned 250 total points
ID: 10749904
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
 
LVL 1

Author Comment

by:dsch
ID: 10751055
Cheers,
Got that working straight away, Thanks for your help.
Kind Regards
David S
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question