Solved

Security issues with WaitForCommEvent on a laptop?

Posted on 2014-03-12
6
315 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

688 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