none
How to bypass the data from driver to OS ( example : hidusbfx2 ) RRS feed

  • Question

  • Hi:

    Thanks for the help first!

    My dev environment is : vs2015 with WDK 10,

    I take the sample of WDK 10 ( Windows-driver-samples-master\hid\hidusbfx2 ) as practice,

    I modify some source to fit my target device ( just a regular mouse ),

    For now, I can see the data( x, y , button, wheel ) from mouse at the continues reader function "HidFx2EvtUsbInterruptPipeReadComplete";

    but the mouse cursor never move on screen ( I guess the mouse data just not pass to the OS );

    Is there anyone aware how to achieve this?

    PS:

    I checked this link:

    It says that can be achieved by calling "WdfRequestCompleteWithInformation" function,

    but continues reader don't have WDFRequest to do so... ( tried several way and no luck ).

    http://www.osronline.com/showthread.cfm?link=245684


    • Edited by graygray Thursday, January 28, 2016 8:43 AM
    Thursday, January 28, 2016 8:41 AM

Answers

  • as pavel stated, if you require mouse input, it is best to just plug in another device. if what you want is for the mouse your driver is controlling to still be a mouse, you need to update the HID report descriptor to include a mouse and then report the data correctly

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

    • Marked as answer by Doron Holan [MSFT] Thursday, January 28, 2016 4:55 PM
    • Unmarked as answer by graygray Friday, January 29, 2016 2:24 AM
    • Marked as answer by Doron Holan [MSFT] Friday, January 29, 2016 2:52 AM
    • Unmarked as answer by graygray Friday, January 29, 2016 6:44 AM
    • Marked as answer by graygray Friday, January 29, 2016 6:44 AM
    • Unmarked as answer by graygray Friday, January 29, 2016 6:45 AM
    • Marked as answer by graygray Friday, January 29, 2016 6:45 AM
    Thursday, January 28, 2016 4:55 PM

All replies

  • but the mouse cursor never move on screen ( I guess the mouse data just not pass to the OS );

    A great guess!

    Is there anyone aware how to achieve this?


    Windows supports multiple input devices. Attach another mouse (but do not install your driver on it) and it will work as usual.

    --pa

    • Marked as answer by Doron Holan [MSFT] Thursday, January 28, 2016 4:55 PM
    • Unmarked as answer by graygray Friday, January 29, 2016 2:19 AM
    Thursday, January 28, 2016 9:07 AM
  • as pavel stated, if you require mouse input, it is best to just plug in another device. if what you want is for the mouse your driver is controlling to still be a mouse, you need to update the HID report descriptor to include a mouse and then report the data correctly

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

    • Marked as answer by Doron Holan [MSFT] Thursday, January 28, 2016 4:55 PM
    • Unmarked as answer by graygray Friday, January 29, 2016 2:24 AM
    • Marked as answer by Doron Holan [MSFT] Friday, January 29, 2016 2:52 AM
    • Unmarked as answer by graygray Friday, January 29, 2016 6:44 AM
    • Marked as answer by graygray Friday, January 29, 2016 6:44 AM
    • Unmarked as answer by graygray Friday, January 29, 2016 6:45 AM
    • Marked as answer by graygray Friday, January 29, 2016 6:45 AM
    Thursday, January 28, 2016 4:55 PM
  • Thanks, Doron,

    if what you want is for the mouse your driver is controlling to still be a mouse,

    Yes, it's exactly what I want!

    you need to update the HID report descriptor to include a mouse and then report the data correctly

    How can I report to system at the continues reader function "HidFx2EvtUsbInterruptPipeReadComplete"???

    Do you know how to achieve more specifically? or sample code I can reference.



    • Edited by graygray Friday, January 29, 2016 2:45 AM
    Friday, January 29, 2016 2:39 AM
  • you have to complete the incoming READ reports that come from hidclass with the hid report data

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

    Friday, January 29, 2016 2:53 AM
  • Hi Doron:

    I appreciate your answer, but it's still to rough to me?

    have to complete the incoming READ reports that come from hidclass with the hid report data

    which function & how should I implement? 

    • Marked as answer by graygray Friday, January 29, 2016 6:44 AM
    • Unmarked as answer by graygray Friday, January 29, 2016 6:44 AM
    Friday, January 29, 2016 3:36 AM