Solved

How to get status of serial lines (CTS, DSR) with Windows 3.1 Communications API

Posted on 1998-03-16
3
407 Views
Last Modified: 2013-12-03
Hi all genius. I have programmed a program in Windows 95 that uses serial ports. Under that platform, I used GetModemCommStatus to get the status of Clear To Send and Data Set Ready lines of RS-232. That function doesn't exist in 16 bits Windows. How can I do the same in Windows 3.1? I've used GetCommError but this doesn't work :(

Thanks in advance,
Jaime
0
Comment
Question by:DaThiN
  • 2
3 Comments
 
LVL 1

Expert Comment

by:JamieR
ID: 1412084
Jaime,

Use EscapeComm under Win16.
Use EscapeCommFunction under Win32.

Jamie!
0
 

Author Comment

by:DaThiN
ID: 1412085
That functions let me set or clear, for example, DTR and RTS signals. That isn't what I wanted to do. I want to know in what state (high or low, 1 or 0) is the signals CTS and DSR. Under win32 I used GetCommModemStatus. But it isn't supported by Win16.

Thanks
Jaime
0
 
LVL 1

Accepted Solution

by:
JamieR earned 30 total points
ID: 1412086
Mmmm, should have read the question. I can only suggest that you use the GetCommEventMask facility to get notification when the flags change.

Jamie
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

831 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