none
Send FeatureReport to lower device before driver being Unload RRS feed

  • Question

  • Hi all,

        I'm now writing a lower filter driver for HID-Compliant device and I want to do some uninit process (By sending FeatureReport to lower device) before driver being unload/removed. However, I tried to register the EvtDeviceReleaseHardware()/EvtDeviceQueryStop()/EvtDeviceQueryRemove callback but in none of them could I send feature report successfully. Lower driver seems already been unloaded  and WdfIoTargetSendIoctlSynchronously(IOCTL_HID_SET_FEATURE) is always failed.

        And my question is in KMDF, when user intends to unload/remove the driver, is there any callback that is called earlier enough where I can send FeatureReport successfully? Thanks so much.

    Will Tommy

    • Edited by smcsekhars Tuesday, December 18, 2012 6:07 PM
    Tuesday, December 18, 2012 2:24 PM

All replies

  • Try EvtDeviceD0Exit.

    Mark Roddy Windows Driver and OS consultant www.hollistech.com

    Tuesday, December 18, 2012 3:33 PM
    Moderator
  • You are filtering on the hidclass enumerated device right? It your inf matches against a HW id that starts with HID. You need a file handle to send this ioctl iirc, so neither d0exit or releasehw make sense. Are you successfully sending the ioctl at any other time in your driver?

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

    Tuesday, December 18, 2012 4:27 PM
  • Yes, I'm filtering on the hidclass enumerated. And I could send IOCTL successfully in any other time. Since neither D0Exit or releaseHW would take effect, does KMDF has any other callback where I can do that? Thanks.
    Tuesday, December 18, 2012 10:31 PM