Solved

Security issues with WaitForCommEvent on a laptop?

Posted on 2014-03-12
6
307 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
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…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

749 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