Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Installing UMDF2 Device Filter Driver

Michael_BMichael_B Member Posts: 31

How would i install a UMDF2 Device (not class) Filter driver for an existing device.

An inf is not appropriate (being a device filter), so i figure i need to directly add the filter via the registry and power cycle the port

It seems i need to add the LowerFilter (or UpperFilter) REGMULTISZ of WUDFRd and then somehow add values under WUDF key under Device Parameters ? So WUDFRd knows what to do.

Ive tried this but the device would start saying invalid registry entry. There seems to be no documented way to add a UMDF2 Device Filter?

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,641

    Device filters are typically installed with an INF. Especially with UMDF where the install sets up UMDF properties properly. What is the minimum OS you are targeting? If win10, the INF can simply be an extension INF and you don't need to duplicate the FDO's INF.

    d
  • Michael_BMichael_B Member Posts: 31

    Windows 10

    Essentially my UMDF2 filter is a LowerFilter of WINUSB. (I need this filter work around WinUSB limitations, e.g 4k control limit etc.)

    Can UMDF2 filter go below WinUSB?

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,641
    I don’t think it can as umdf doesn’t know how to marshal the URB into user mode. You should use a KMDF filter. Look into installing your lower filter with an extension INF.
    d
  • craig_howardcraig_howard Member Posts: 182

    Hmm ... I wasn't aware that any kind of filter driver was possible in UMDF, since everything has to go through the reflector and everything I might want to filter (USB, network, file system, storage device) has it's stack in kernel space anyway ...

    What kind of stacks could I filter in UMDF?

  • Michael_BMichael_B Member Posts: 31

    OK that is unfortunate, i was hoping to keep it all userspace. Is there are reason why winusb is limited to 4k control transfers?

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,093

    Control transfers are the least efficient of all USB transfer types. A 4k transfer has to get chopped up into 64 individual packets, each of which has to be scheduled individually. If you need to transfer that much data you should be using a bulk pipe anyway.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Michael_BMichael_B Member Posts: 31
    edited September 16

    Agreed, however the spec can support up to 64k in length, anyway Ive optimistically added it to Microsoft Q&A as an enhancement request :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 15 November 2021 Live, Online
Writing WDF Drivers TBD Live, Online
Developing Minifilters 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online