UMDF Filter

Has anyone walked through the UMDF installation process enough to know
what registry magic gets done?

I need to install a standalone UMDF upper filter for an existing
device. There is a sample KMDF upper filter in the WDK that is
installed using a simple application that calls the KMDF coinstaller
directly using a fake INF. That’s what I want, but for UMDF. There is
a sample UMDF upper filter in the WDK, but it is installed with an INF
along with a function driver.

The UMDF coinstaller does not have the same exports as the KMDF
coinstaller. It does have an export with the tantalizing name
“InstallStandaloneUmdf”, but there are zero Google hits for that name.

So, I’m trying to reverse engineer the process. Here’s what I have
done. I copied the driver DLL into place (drivers\umdf). I created a
WUDF registry key inside Device Parameters in my devices Enum key, and
added a DriverList value with my driver’s name. I added an UpperFilters
value to the Enum key, set to “wudfrd”. I then created a subkey in
HKLM\Software\Microsoft\Windows NT\CurrentVersion\WUDF\Services with my
driver’s name, with ComCLSID, ImagePath, WdfMajorVersion and
WdfMinorVersion. I also created a regular COM entry in HKCR\CLSID.

This is at least partly correct, because someone is creating a
WUDFDiagnostics key in my Device Parameters, but my DLL is not getting
loaded, and I get a Code 10 in Device Manager.

Has anybody successfully created and installed a standalone UMDF filter
driver? How did you install it?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Why can’t you do an inf based install?

d

Bent from my phone


From: Tim Robertsmailto:xxxxx
Sent: ?12/?13/?2013 4:05 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] UMDF Filter

Has anyone walked through the UMDF installation process enough to know
what registry magic gets done?

I need to install a standalone UMDF upper filter for an existing
device. There is a sample KMDF upper filter in the WDK that is
installed using a simple application that calls the KMDF coinstaller
directly using a fake INF. That’s what I want, but for UMDF. There is
a sample UMDF upper filter in the WDK, but it is installed with an INF
along with a function driver.

The UMDF coinstaller does not have the same exports as the KMDF
coinstaller. It does have an export with the tantalizing name
“InstallStandaloneUmdf”, but there are zero Google hits for that name.

So, I’m trying to reverse engineer the process. Here’s what I have
done. I copied the driver DLL into place (drivers\umdf). I created a
WUDF registry key inside Device Parameters in my devices Enum key, and
added a DriverList value with my driver’s name. I added an UpperFilters
value to the Enum key, set to “wudfrd”. I then created a subkey in
HKLM\Software\Microsoft\Windows NT\CurrentVersion\WUDF\Services with my
driver’s name, with ComCLSID, ImagePath, WdfMajorVersion and
WdfMinorVersion. I also created a regular COM entry in HKCR\CLSID.

This is at least partly correct, because someone is creating a
WUDFDiagnostics key in my Device Parameters, but my DLL is not getting
loaded, and I get a Code 10 in Device Manager.

Has anybody successfully created and installed a standalone UMDF filter
driver? How did you install it?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Doron Holan wrote:

Why can’t you do an inf based install?

An INF-based install only works if I am also installing the function
driver. There are cases where we need to install a filter onto function
drivers we don’t own.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

In that case you reference the fdo inf, no?

d

Bent from my phone


From: Tim Robertsmailto:xxxxx
Sent: ?12/?13/?2013 4:31 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re: [ntdev] UMDF Filter

Doron Holan wrote:
Why can’t you do an inf based install?

An INF-based install only works if I am also installing the function driver. There are cases where we need to install a filter onto function drivers we don’t own.


Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Doron Holan wrote:

In that case you reference the fdo inf, no?

Only for inbox INFs. For a third-party device, I’d have to go search to
find the oem## name in order to Include/Needs it.

Right?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts wrote:

Doron Holan wrote:
> In that case you reference the fdo inf, no?

Only for inbox INFs. For a third-party device, I’d have to go search
to find the oem## name in order to Include/Needs it.

For those of you following along at home, here are two updates on this.

One, it turns out my biggest problem was caused by not enabling the
“it’s OK for the next higher driver to be kernel mode”. With that
correction, the registry manipulations I described previously are
sufficient to install a UMDF filter without an INF.

Two, it is not possible to use a UMDF filter in a Kernel Streaming
stack. Doron has previously said that such a configuration had never
been anticipated and had not been tested. Well, I’ve done extensive
testing this week, and I can assert that the IRP magic used by the
Kernel Streaming ioctls (which are METHOD_NEITHER) does not mate with
the UMDF reflector.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>sufficient to install a UMDF filter without an INF.

BTW - if one needs a sample on how to install filter driver via INF, look at Intel Rapid Storage driver package, they contain both a functional driver for SATA/AHCI parts of their ICHx chips and the disk stack filter driver.

Look at the clauses about the latter.

This is not related to UMDF (sorry for offtopic).


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

Thank you for circling-back on this, Tim.

It’s always extra-nice when people take the time to update the thread for the benefit of those who come after them.

Peter
OSR