Re: How to use 2 USB mice independently and simultaneously?

From: Doron Holan [MS] (doronh_at_nospam.microsoft.com)
Date: 11/03/04


Date: Tue, 2 Nov 2004 21:04:08 -0800

use WM_INPUT. you can distinguish between independent input streams using
this message.

(yes, windows open the mouse for exclusive access immediately when it
arrives, you are not allowed to read from it.)

d

-- 
Please do not send e-mail directly to this alias. this alias is for 
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Zed" <artur@chello.nl> wrote in message 
news:bfe179bd.0411021540.3654af23@posting.google.com...
> 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

  • How to use 2 USB mice independently and simultaneously?
    ... INDEPENDENT USB mice SIMULTANEOUSLY as input devices. ... the HID input reports. ... I see some solutions if I cannot access HID mouse from HID driver ... At Windows level if there is some differentiation possible to see ...
    (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)
  • Re: USB keyboard HID problem
    ... software can do to get the HID device to work on SH7727. ... > This modification solve the problem, that sometimes the USB Host ... the HID driver always requests ... >> Windows CE Device Drivers ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Cannot restore registry
    ... | feature, follow these steps: ... When the Windows Advanced Options menu appears, ... | Feature: Device Driver Roll Back ... | Feature: System Restore ...
    (microsoft.public.windowsxp.configuration_manage)
  • Re: Boot up problem... with a difference
    ... Safe mode boot is fine. ... Looked further into the last errors and noticed PXRD Driver. ... Event Type: Error ... Windows cannot unload your classes registry file - it is still in ...
    (microsoft.public.windowsxp.help_and_support)