Re: turning a device into a mouse



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

.



Relevant Pages

  • RE: Device driver load/unload notifications
    ... notification for every StreamDevice driver which is in the system. ... you'll get only the notification for your special device. ... if you use your own guid or the DEVCLASS_STREAM_GUID. ... When stream driver A is being loaded and unloaded, ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Device driver load/unload notifications
    ... notification for every StreamDevice driver which is in the system. ... you'll get only the notification for your special device. ... if you use your own guid or the DEVCLASS_STREAM_GUID. ... When stream driver A is being loaded and unloaded, ...
    (microsoft.public.windowsce.platbuilder)
  • Confused about Kernel Streaming / DShow clocks...
    ... queried to give me a very accurate clock source. ... master clock for the graph (which might be themselves, ... then my clock support is going via the stream class driver. ...
    (microsoft.public.development.device.drivers)
  • Confused about Kernel Streaming / DShow clocks...
    ... queried to give me a very accurate clock source. ... master clock for the graph (which might be themselves, ... then my clock support is going via the stream class driver. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Confused about Kernel Streaming / DShow clocks...
    ... If you are a stream class minidriver, you implement the clock using the ... > written under the stream class driver. ...
    (microsoft.public.win32.programmer.directx.video)