Additional mouse under Windows

Hello everyone,

Please help me to answer the following question: I have a software that
needs a second mouse to do some tasks. I intend to connect the mouse to an
USB port and then use it only in that application. But the problem is that
once connected the second mouse behaves just like the first mouse. And the
question is: how can I communicate with the second USB mouse from the
application? I need to do it in a possibly simple way, without developing a
device driver for that purpose - is that possible?

Best regards and thanks for any help,
Rafal Gwizdala

No. You need a filter driver for this.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Rafal Gwizdala” wrote in message
news:…
> Hello everyone,
>
> Please help me to answer the following question: I have a software that
> needs a second mouse to do some tasks. I intend to connect the mouse to an
> USB port and then use it only in that application. But the problem is that
> once connected the second mouse behaves just like the first mouse. And the
> question is: how can I communicate with the second USB mouse from the
> application? I need to do it in a possibly simple way, without developing a
> device driver for that purpose - is that possible?
>
> Best regards and thanks for any help,
> Rafal Gwizdala
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

You may be able to use DirectInput to enumerate the specific device you
want, call SetCooperativeLevel to DISCL_EXCLUSIVE, and Acquire() the
device. At least the documentation says so (and I vaguely remember doing
this at one point ;-).

There some question as to whether you can get background exclusive
access to the device (i.e. I can’t quite tell whether it’s actually
prevented or just discouraged :-), but you should be able to grab it at
least when your app has the focus. I’m too lazy to write a test app to
find out, I’m afraid.

Remember, though, that there’s only 1 pointer in the system. You’ll have
to interpret all the data from the mouse entirely on your own, draw your
own pointer (if desired), etc., etc., etc.

Maxim S. Shatskih wrote:

No. You need a filter driver for this.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Rafal Gwizdala” wrote in message
> news:…
>
>>Hello everyone,
>>
>>Please help me to answer the following question: I have a software that
>>needs a second mouse to do some tasks. I intend to connect the mouse to an
>>USB port and then use it only in that application. But the problem is that
>>once connected the second mouse behaves just like the first mouse. And the
>>question is: how can I communicate with the second USB mouse from the
>>application? I need to do it in a possibly simple way, without developing a
>>device driver for that purpose - is that possible?
>>
>>Best regards and thanks for any help,
>>Rafal Gwizdala
>>
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>
> http://www.osronline.com/article.cfm?id=256
>
>>You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>


…/ray..

Please remove “.spamblock” from my email address if you need to contact
me outside the newsgroup.

> I’m too lazy to write a test app to

find out, I’m afraid.

That is an interesting topic (to me at least) so if someone does such a test
app, please let us know how reliable the technique is :slight_smile:

Mat

Hello again.

Thanks for all the hints. I think I’ll be doing some research on the topic
in few weeks, so when I develop the test app I’ll make it available for
you.

Best regards,
Rafal Gwizdala

“Mathieu Routhier” wrote in message
news:xxxxx@ntdev…
> > I’m too lazy to write a test app to
> > find out, I’m afraid.
>
> That is an interesting topic (to me at least) so if someone does such a
test
> app, please let us know how reliable the technique is :slight_smile:
>
> Mat
>
>

Just to clarify: I am not asking for the code, I only want to know whether
or not the DirectInput “capture” technique is effective.

Mat

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rafal Gwizdala
Sent: Thursday, August 05, 2004 3:32 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Additional mouse under Windows

Hello again.

Thanks for all the hints. I think I’ll be doing some research on the topic
in few weeks, so when I develop the test app I’ll make it available for
you.

Best regards,
Rafal Gwizdala

“Mathieu Routhier” wrote in message
news:xxxxx@ntdev…
> > I’m too lazy to write a test app to
> > find out, I’m afraid.
>
> That is an interesting topic (to me at least) so if someone does such a
test
> app, please let us know how reliable the technique is :slight_smile:
>
> Mat
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@encentrus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com