|
-
September 8th, 1999, 08:13 PM
#1
Checking to see if a mouse is connected to a serial port...
How can I check and see if a mouse (or any other device), is connected to a computers serial port?
I was thinking tryin' to read from the port, and if no data was received, then there was no device connected, but do mice and other devices constantly send data? or only when in use??
Thanks in advance.. Cube
-
September 22nd, 1999, 10:27 AM
#2
Re: Checking to see if a mouse is connected to a serial port...
I've spent days looking and have found nothing.
EnumPorts will tell you what ports you have.
TAPI can tell you if a modem is connected to a port.
But nothing I've found tells you if the mouse is connected.
Somehow the modems control panel dialog knows, cuz it doesn't make that port available for modems.
The MOUSE.DRV driver exports an Inquire function that tells you what com port the mouse is on but you can only use it if you're a system process.
It's not in the registry either.
-
September 23rd, 1999, 12:22 PM
#3
Re: Checking to see if a mouse is connected to a serial port...
Continuing adventures...
I tried opening VMOUSE as a device for IOCtl to get information from it but the open failed - VMOUSE does not support DeviceIOControl.
I tried using int 2fh to get Device API Entry Point so I cauld talk directly to the VMOUSE driver but you cannot call software interrupts in Windows programs!
If you just want to know the port is in use by something - try to open it with CreateFile. You'll get 'access denied' if the mouse (or anything else) is using the port.
-
November 19th, 2000, 09:58 PM
#4
Re: Checking to see if a mouse is connected to a serial port...
Hello,
How to enter the system process?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|