Gladstone, Benjamin D wrote:
I’m writing an upper filter driver to sit on top of usbhub3.sys.
Allow me to complement you on having the foresight to show is the INF
and the log file, so I could answer my questions. Also please allow me
to correct your terminology. You are not writing an upper filter driver
to sit on top of usbhub3.sys. Instead, you are writing a device upper
filter to sit on top of a specific USB hub device. That device happens
to have usbhub3.sys as its default driver.
Do you understand that your INF will only work on Windows 8? You are
referencing the Microsoft INF stack, which does not exist in Windows 7
and before.
I’m pretty new to driver development, so forgive the stupid question.
I’m trying to use a .inf file to install and load my driver, but
Windows is just not having it. I install the inf and according to
setupapi.dev.log, the driver is installed but it fails a signature
verification and therefore Windows chooses to load usbhub3.sys instead.
First, you are trying to use InfDefaultInstall to install your driver.
Don’t do that. InfDefaultInstall is only used for INF files that have a
[DefaultInstall] section. It is NEVER used for PnP INF files, which is
what you are attempting to do here. You can use pnputil to pre-install
your package, or you can just right-click in Device Manager and update
the driver.
I should also point out that it is not necessary to use an INF file to
add a device upper filter. Remember that each INF file for a single
device completely replaces whatever INF file came before it. Windows
does not have the concept of “adding on”. That’s why you need to
Include/Needs the original driver. Thus, after installation, your INF
file will be **THE** primary driver for that USB hub on your machine.
Remember, all you need to do to install a device upper/lower filter is
(a) copy the file into place, (b) create a service, and (c) modify the
registry to add your service to the UpperFilters/LowerFilters key in the
device you want to filter. You can do (a) and (b) from a batch file,
and (c) with a relatively simply application, using the SetupDi APIs.
Why is Windows choosing one or the other? I want my filter driver to
load on top of usbhub3.sys, not instead of. Why won’t Windows just
load both?
Your INF does this:
Include=usbxhci.inf
2.
Needs=Generic.Install.NT
“usbxhci.inf” does, indeed, contain a [Generic.Install.NT] section, but
that INF is for USB3 host controllers, not for hubs, As you could have
seen in the log file, you should be using
Include=usbhub3.inf
That applies to your Services section as well.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.