Is COM port busy with mouse

How can I determine is COM port buzy with mouse?
I'm using MS VC++ 6.0.
Thanks.
SergeykaAsked:
Who is Participating?
 
AlexVirochovskyConnect With a Mentor Commented:
O , it is something else. For detect
com port is buzy/free simple use
CreateFile ("com1:", ..) and if
function fails, test (with GetLastError) reason for this .
If reason : EBUSY (or something same)
com post is buzy.
0
 
jazzmasterCommented:
What exactly are you trying to do? What kind of project is it? (i.e. SDI, MDI, dialog, or console). What you need to do is add a function attached to a WM_MOUSEMOVE event, so that whenever the mouse moves your code is triggered, which is easy to do using the class wizard. It really depends on what you're trying to do! Please give more details.
0
 
SergeykaAuthor Commented:
To jazzmaster...
I've created a dialog based application. A kind of monitor, which receives data from COM port. I need to determine is COM1 port handles mouse, then program should not use this port.
0
 
SergeykaAuthor Commented:
Thanks, Alex.
Actually I found this myself tonight...
Ìåòîäîì íàó÷íîãî òûêà...
;-)
0
All Courses

From novice to tech pro — start learning today.