none
How to create one driver by passing mouse data to mouse class driver? RRS feed

  • Question

  • Dear Sir:

    I am beginner for developing driver, not much experience.
    I would like to write a USB(not HID) touch screen driver(can work at multi-monitors), and I simulate it to a mouse(loads as a mouse )
    I want to got mouse data from my usb device and pass it to the mouclass class driver
    (Class=Mouse、Include=msmouse.inf、Needs=MouClass.Services)
    What's DDK sample code do I use? And how to send data to mouclass class driver?
    If I would like to set/get pointer at secondary monitor, how to do in my driver?

    Thanks for your great help!

    BR,
    Alan

    Thursday, June 11, 2015 9:38 AM

Answers

  • there is no wdk sample which does what you want. your best bet is actually to go the HID route. Easiest path is your device conforms to the USB HID spec. Second easiest path is to write a custom HID WDF based miniport, there are both UMDF and KMDF samples for this. You report a HID mouse and you get to reuse the entire HID mouse input stack. 

    you don't control where the pointer is put (second or first monitor) in the driver. the system controls that. touch is the same


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, June 11, 2015 8:00 PM

All replies

  • there is no wdk sample which does what you want. your best bet is actually to go the HID route. Easiest path is your device conforms to the USB HID spec. Second easiest path is to write a custom HID WDF based miniport, there are both UMDF and KMDF samples for this. You report a HID mouse and you get to reuse the entire HID mouse input stack. 

    you don't control where the pointer is put (second or first monitor) in the driver. the system controls that. touch is the same


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, June 11, 2015 8:00 PM
  • Dear Doron:

    Thanks for your great suggestion

    I could get USB HID data from my device...
    What's sample code I need? hidusbfx2 or moufiltr or others?

    If I would like mouse work at second monitor, how to set at driver?
    Should I set MOUSE_MOVE_ABSOLUTE or MOUSE_VIRTUAL_DESKTOP or both to Flags field at MOUSE_INPUT_DATA?
    Which function do I set Flags field?

    I got the data from USB-HID touch that is relative (x,y), how to remap to absolute (x,y) for multi-monitors?
    Because driver doesn't know size of virtual desktop(primary + secondary monitors) and origin (x,y), maybe need application to set this information into driver
    i am confused

    Thanks for your help

    BR,
    Alan

    Wednesday, June 17, 2015 10:13 AM
  • Dear Doron:

    Thanks for your great suggestion

    I use moufiltr sample to modify for my device

    But if I would like mouse work at second monitor, how to set at driver?
    Should I set MOUSE_MOVE_ABSOLUTE or MOUSE_VIRTUAL_DESKTOP or both to Flags field at MOUSE_INPUT_DATA at MouseClassServiceCallback function?

    I got the data from USB-HID touch that is relative (x,y), how to remap absolute (x,y) for multi-monitors?
    Or I don't care this remap, because class driver can do???


    Thanks for your help


    BR,
     Alan

    Tuesday, July 21, 2015 6:19 AM
  • the class driver won't remap to the second monitor.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 21, 2015 6:00 PM