Toaster KMDF Filter Driver install on Windows 7 x64 problem

Hi!

I’m trying to install the passthrough toaster kmdf filter driver example on Windows 7 x64. I built the driver, modified the registry as directed by the .inf (just for the generic driver, NOT the wdffeatured.sys driver), and placed the filter driver in the Registry under Image class UpperFilters (along with ksthunk which is already there). In the Registry, ErrorControl is 1, Service is 1, Start is 3. When I try to use a video device with the driver listed in the Image class, it doesn’t work, but without the driver in the UpperFilters path, it does. I do see an Enum key in the Registry which tells me that my driver is being seen and probably is trying to be invoked, but WinDBG doesn’t show my driver as loading. I’d love some help on next steps, and any information on the following questions:

  1. I started with just a stock Windows 7 image, with nothing special installed for WDF. I didn’t use a coinstaller but just manipulated the Registry directly. Do I need wdffeatured.sys, and/or the coinstaller stuff? I thought all I needed was some registry settings and to copy in the .sys file…

  2. I turned off the required driver signing and some other check so hopefully the fact that I’m in the windows/system32/drivers directory is ok and not running from the driver store.

  3. The default Toaster passthrough driver should do just that, pass all requests. Any reported problems with that?

Thanks!

Steve

What version of kmdf did you use? Did you put your filter above or below ksthunk?

Thx
d

Bent from my phone


From: xxxxx@aol.commailto:xxxxx
Sent: ?9/?13/?2013 7:28 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Toaster KMDF Filter Driver install on Windows 7 x64 problem

Hi!

I’m trying to install the passthrough toaster kmdf filter driver example on Windows 7 x64. I built the driver, modified the registry as directed by the .inf (just for the generic driver, NOT the wdffeatured.sys driver), and placed the filter driver in the Registry under Image class UpperFilters (along with ksthunk which is already there). In the Registry, ErrorControl is 1, Service is 1, Start is 3. When I try to use a video device with the driver listed in the Image class, it doesn’t work, but without the driver in the UpperFilters path, it does. I do see an Enum key in the Registry which tells me that my driver is being seen and probably is trying to be invoked, but WinDBG doesn’t show my driver as loading. I’d love some help on next steps, and any information on the following questions:

1) I started with just a stock Windows 7 image, with nothing special installed for WDF. I didn’t use a coinstaller but just manipulated the Registry directly. Do I need wdffeatured.sys, and/or the coinstaller stuff? I thought all I needed was some registry settings and to copy in the .sys file…

2) I turned off the required driver signing and some other check so hopefully the fact that I’m in the windows/system32/drivers directory is ok and not running from the driver store.

3) The default Toaster passthrough driver should do just that, pass all requests. Any reported problems with that?

Thanks!

Steve


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>

Hi!

My WDF version on both the build and target machines is 1.11. Is there a way in some of the .inf or build settings to specify or query the version I’m building with, or does it default to the version of wdf01000.sys in drivers? And I put my driver both above and below ksthunk (which I would guess is controlled by the order of the drivers listed in the upperfilter reg key for the class?). Neither worked…

But thanks for the suggestions! I did have 1.09 on the Win7 target and was hopeful that changing that would help, but no such luck… I wish I knew why this filter wasn’t loading…

xxxxx@aol.com wrote:

I’m trying to install the passthrough toaster kmdf filter driver example on Windows 7 x64. I built the driver, modified the registry as directed by the .inf (just for the generic driver, NOT the wdffeatured.sys driver), and placed the filter driver in the Registry under Image class UpperFilters (along with ksthunk which is already there). In the Registry, ErrorControl is 1, Service is 1, Start is 3. When I try to use a video device with the driver listed in the Image class, it doesn’t work, but without the driver in the UpperFilters path, it does.

What DOES happen when you plug in the camera with your driver in
UpperFilters? Is there a yellow bang? Or does the driver load, but not
function?

How did you modify UpperFilters? Remember this is a REG_MULTI_SZ. You
can’t, for example, write “ksthunk,myfilter”. In regedit, you have to
put the entries on separate lines.
ksthunk
myfilter

I do see an Enum key in the Registry which tells me that my driver is being seen and probably is trying to be invoked, but WinDBG doesn’t show my driver as loading.

A filter driver does not get its own key in the Enum branch. The camera
gets one, but you can’t tell from its key whether a class filter is present.

  1. I started with just a stock Windows 7 image, with nothing special installed for WDF. I didn’t use a coinstaller but just manipulated the Registry directly. Do I need wdffeatured.sys, and/or the coinstaller stuff? I thought all I needed was some registry settings and to copy in the .sys file…

If you built for KMDF 1.9, then you don’t need any co-installer magic on
Win 7.

  1. I turned off the required driver signing and some other check so hopefully the fact that I’m in the windows/system32/drivers directory is ok and not running from the driver store.

The driver store is not involved here. Driver store is only used for a
new PnP installation. How did you turn off the driver signing test?
For the KMCS (64-bit) check, you have to do that at every boot. I have
found it more convenient just to sign my binaries for testing.


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

Build against v1.9. the only way v1.11 got onto a win7 system is if you installed there previously. With the way KMDF always pends all io, I think filtering above ksthunk will stop the stack from working

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@aol.com
Sent: Friday, September 13, 2013 9:38 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Toaster KMDF Filter Driver install on Windows 7 x64 problem

Hi!

My WDF version on both the build and target machines is 1.11. Is there a way in some of the .inf or build settings to specify or query the version I’m building with, or does it default to the version of wdf01000.sys in drivers? And I put my driver both above and below ksthunk (which I would guess is controlled by the order of the drivers listed in the upperfilter reg key for the class?). Neither worked…

But thanks for the suggestions! I did have 1.09 on the Win7 target and was hopeful that changing that would help, but no such luck… I wish I knew why this filter wasn’t loading…


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

xxxxx@aol.com wrote:

My WDF version on both the build and target machines is 1.11. Is there a way in some of the .inf or build settings to specify or query the version I’m building with, or does it default to the version of wdf01000.sys in drivers?

If you use the Win 7 WDK (7600), your driver will want 1.9. If you are
using the Win 8 WDK, the target KMDF version is one of the build parameters.


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

How does one target a specific version of the WDF? I guess if I build with WDK 7600 I get 1.9 by default, and to target 1.11 I’d need to build with a later version of the WDK? Is it just some setting in a project file or some such for WDK 7600?

Also, now that I’ve upgraded my target Win 7 system to 1.11, it seems I want to really return it to 1.9. Good thing I took a snapshot of the VM…

Thanks all! Still can’t install filter… I do see usbvideo.sys load when I plug in the camera, but not my filter… and usbvideo.sys gets loaded in whether my filter is in upperFilters key or not… I’m using a little Win32 program which uses WM_CAP commands to set up the camera view, present a list of selections of video sources, etc. When my filter is in the stack the capCreateCaptureWindow is black, and I don’t get the WM_CAP_DLG_VIDEOSOURCE stuff. I wonder if the filter is affecting this somehow… but again, I don’t even see the filter load…

xxxxx@aol.com wrote:

How does one target a specific version of the WDF? I guess if I build with WDK 7600 I get 1.9 by default,…

Up through the 7600 WDK, each WDK shipped with one version, and that’s
the version you got. So, WDK 7600 means KMDF 1.9 No other option.

Starting in the 9200 WDK, the kit includes all of the libraries, and you
can choose your target in the project settings.

and to target 1.11 I’d need to build with a later version of the WDK?

Yes.

Is it just some setting in a project file or some such for WDK 7600?

No, there is no option for WDK 7600. You get 1.9. End of line.

Also, now that I’ve upgraded my target Win 7 system to 1.11, it seems I want to really return it to 1.9. Good thing I took a snapshot of the VM…

There is no reason to do so. KMDF is completely downward compatible.
That’s why you declare the version; when the 1.11 runtime sees that you
want 1.9, it gives you 1.9 functionality.

Thanks all! Still can’t install filter… I do see usbvideo.sys load when I plug in the camera, but not my filter…

How do you know? Are you watching for debug messages in windbg?


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