How to use 2 USB mice independently and simultaneously?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Zed (artur_at_chello.nl)
Date: 11/02/04


Date: 2 Nov 2004 15:40:29 -0800

Hello Experts :-),
  
I am writing a Windows XP fun-application and would like to use 2
INDEPENDENT USB mice SIMULTANEOUSLY as input devices. Therefore, I
understant, I have to go below OS mouse events (below mouse driver) as
they all appear as coming from a single mouse. So, I tried to go
through reading a HID-based device as described in the DDK. But I
cannot get any data from a HID-based mouse. The reason is that I
cannot even open a file by CreateFile (cannot get the handle to the
mouse) cause this returns an Invalid_Handle_Value.

What I think happens is that OS open a file earlier (at installing the
device) capturing the handle and that only one file handle can be open
to a HID based device, so the OS is the only one to be able to readall
the HID input reports.

Am I right? Or is ther a way to get input from mouse at HID device
level?

I see some solutions if I cannot access HID mouse from HID driver
level:
1. At Windows level if there is some differentiation possible to see
from which mouse the particular event came. But I doubt whether it is
possible.

2. There is some way to overtake a handle to HID from OS. Whether
stealing at the moment the device is connecting and drivers are
interconnecting, or after the device is already connected. Somehow. I
do not have a clue ho to do this. Any tips guys?

3. There is a filter driver needed below HID driver (HID mini driver?
USB driver?), from where the mouse reports could be stolen from OS, or
maybe forked?

Would like to hear your opinion on that issue,
Any help? Example code?

Kind regards,
Zed



Relevant Pages

  • Re: How to use 2 USB mice independently and simultaneously?
    ... you can distinguish between independent input streams using ... windows open the mouse for exclusive access immediately when it ... I have to go below OS mouse events (below mouse driver) as ... > the HID input reports. ...
    (microsoft.public.development.device.drivers)
  • Renaming of the USB HID driver
    ... the concept of the HID parser is not really USB related anymore. ... USB and Bluetooth subsystems only have to provide a transport layer. ... Here are instructions on how to compile and use the driver. ... plus additions to support force feedback. ...
    (Linux-Kernel)
  • Re: Custom HID device - problems with driver dev
    ... I saw several people refereence the USB printer ... as a launch point for a "generic HID driver" so that's were I started. ... Are you trying to create an int pipe or a bulk pipe? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Mid level layer between device driver and application
    ... injected in a virtual HID driver for a direct multitouch support. ... For that I'll have to deal with kmdf only, ... > device and inject it in the form this project wants. ...
    (microsoft.public.development.device.drivers)
  • Re: Sample HID Client App for WinCE 4.2
    ... I am using a PocketPC model that has USB ... I have emailed the author of the HID mouse driver you refered ... >> I am trying to write a very simple windows CE application that will open ...
    (microsoft.public.pocketpc)