Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Security issues with WaitForCommEvent on a laptop?

Posted on 2014-03-12
6
Medium Priority
?
329 Views
Last Modified: 2014-03-18
Have I ever mentioned that I hate computers? ( just kidding of course!) I have a simple WIN32 console program that runs minimized and waits for DSR to be asserted on a com port ( RS232 ), It uses WaitForCommEvent.  When the test instrument sets DSR, the program querys the instrument for several pieces of data and reformats the data then uses INPUT functions from WinUser.h to insert the string in the stream from the keyboard. Like magic the data is inserted into a cell on a spreadsheet...  or at least it is on a desktop. When I try to run the program on a new laptop ( Win 7 ) it opens the com port OK but never gets an event from the WaitForCommEvent function. I've tested the com port using Hyperterminal and all is well. I smell a security setting!!!  Anyone have any ideas on what setting I need to address?

Regards
RonHarsh
0
Comment
Question by:RonHarsh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:bbao
ID: 39925384
any earlier versions before W7 ever ran the program and got the results as you expected?
0
 

Author Comment

by:RonHarsh
ID: 39925715
No it hasn't been around long enough. But it does work as expected on Windows 7 on any of 4 desktops.  I ran into a similar problem with HIPS ( host intrusion prevention software ) and a wired network connection to a camera ( GigE ) where the HIPS software prevented the camera from sending data.  The com port works normally on this laptop but the detection of DSR using WaitForCommEvent hangs. Yes I have verified that the DSR line is indeed toggling..
0
 

Accepted Solution

by:
RonHarsh earned 0 total points
ID: 39925902
OK, Problem solved ( sort of! ) If I open the port with the OverLapped flag set and use the event to trigger action, it works on the new laptop.  
NOW, Can someone point me a good tutorial on the simplest way to read and write strings to a comport in Overlapped mode?

Thanks
RonHarsh
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 19

Expert Comment

by:regmigrant
ID: 39925978
0
 
LVL 37

Expert Comment

by:bbao
ID: 39928381
it would be good to accept your own comment as the answer and keep this question as PAQ.
0
 

Author Closing Comment

by:RonHarsh
ID: 39936365
pretty straight forward, just had to go down a road I have not traveled before... OverLapped!
0

Featured Post

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

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

Article by: btan
The intent is not to repeat what many has know about Ransomware but more to join its dots of what is it, who are the victims, why it exists, when and how we respond on infection. Lastly, sum up in a glance to share such information with more to help…
Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

610 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