Solved

Getting the state of a serial ports CTS pin

Posted on 2004-04-03
2
649 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now