Solved

Security issues with WaitForCommEvent on a laptop?

Posted on 2014-03-12
6
300 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
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
Comment Utility
any earlier versions before W7 ever ran the program and got the results as you expected?
0
 

Author Comment

by:RonHarsh
Comment Utility
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
Comment Utility
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
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

 
LVL 19

Expert Comment

by:regmigrant
Comment Utility
0
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
Comment Utility
it would be good to accept your own comment as the answer and keep this question as PAQ.
0
 

Author Closing Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

771 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

11 Experts available now in Live!

Get 1:1 Help Now