Re: turning a device into a mouse
- From: "Doron Holan [MSFT]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Jan 2008 14:41:33 -0800
you should probably use the serial mouse example (mouser) as a starting point, way less crud in it that i8042prt. i would suggest creat a HID miniport (the latest WDK has a great HID miniport example in KMDF). this way you just morpth the data into HID and HIDclass takes care of enumerating a mouse and you get to use the built in mouse drivers.
what aobut just having a user mode application that reads teh data and then calls SendInput instead? much simpler than writing a driver. will any other application consume this data that is being turned into a mouse?
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.
"Michael Brian Bentley" <bentley@xxxxxxxxxxxx> wrote in message news:bentley-1059AD.09131202012008@xxxxxxxxxxxxxxxxxxxxxxxxx
Interesting, ok, thanks, I'll take a look at that now. (I'll be
wondering how much of the code in the i8042prt example is likely
reusable for what I'm trying to do...)
-Mike
In article <eZUWAtOTIHA.1208@xxxxxxxxxxxxxxxxxxxx>,
"Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote:
You need:
1) to install your device as Mouse class in the INF file
2) to write the driver as mouse port driver - look at i8042prt DDK sample
The mouse port driver should handle the "internal mouse connect" IOCTL and
then call the upper driver's routine with the array of MOUSE_INPUT_DATA
structures.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com
"Michael Brian Bentley" <bentley@xxxxxxxxxxxx> wrote in message
news:bentley-55E906.16525501012008@xxxxxxxxxxxxxxxxxxxxxxxxx
> Saluations,
>
> I am slowly coming to grips with the task of creating some driver-level
> code to add to existing regular driver code to make a mouse of a > device.
>
> I need to accept a stream of bytes from a device connected by way of a
> USB/COM port, and turn the byte stream into what you'd expect to see
> from a regular mouse input stream.
>
> I originally thought I only needed to create a mouse filter driver to
> convert the byte stream, but now I'm thinking that I need something
> lower, the equivalent of a filter driver "between" the USB/COM driver
> and the mouse drivers, to turn the byte stream into a bona fide mouse
> stream before the mouse driver code sees anything.
>
> Does this thinking make sense?
>
> I have to somehow persuade the system to recognize this resultant
> contraption as a mouse.
>
> I'm reading the WDK documentation, studying the somewhat cryptic .inf
> file configuration process, and trawling for clues. And slowly reading
> the archive for this newsgroup.
>
> For now I'm only trying to get this to work on xp.
>
> Thanks!
>
> -Michael Brian Bentley
.
- References:
- turning a device into a mouse
- From: Michael Brian Bentley
- Re: turning a device into a mouse
- From: Maxim S. Shatskih
- Re: turning a device into a mouse
- From: Michael Brian Bentley
- turning a device into a mouse
- Prev by Date: Re: Use IOCTL_USB_USER_REQUEST to develop a test program for USB devic
- Next by Date: Re: How to treat IRP_MN_START_DEVICE request?
- Previous by thread: Re: turning a device into a mouse
- Next by thread: Re: Mirror Driver Installation
- Index(es):
Relevant Pages
|