SDV thinks the driver is WDM, while it is configured as KMDF

Hello everyone,

I am having a hard time to make SDV work on my KMDF WFP callout and the culprit seems to be related to the fact that SDV thinks my driver model is WDM, while in fact it is configured as WDF (KMDF). I?ve seen many replies on the SDV subject in OSR and decided to give a try for my question. I have not been able to find here an answer to my problem, hence posting this question.

Environment:

VS 2017 15.7.2 (VS2013 and VS2015 are also present on a machine)

Windows 8.1 x64 with all updates on

WDK 10.0.17134.1 (this is the only WDK present on machine, all others are uninstalled)

WDK plugin for Visual Studio 2017

When attempting to run SDV on a newly created project in VS2017 (KMDF) it works like a charm. When attempting to run on my KMDF driver (WFP callout) it complains with a generic error ?There was an error loading the available rules?. As per https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/static-driver-verifier-error-messages this error usually means WDK is improperly installed, but it is not the case since KMDF ?Hello World? project works properly. If I run SDV via command line it also fail with a generic error.

I?ve decided to remove my project and re-create it as an empty KMDF project and start adding source files and checking which exactly project setting is causing the SDV to fail. In the end it was pin pointed to the fact of adding a lib dependency to the import lib fwpkclnt.lib which is understandable since my driver is a WFP callout and needs to use WFP api.

After doing some search on the matter I can see this article from Microsoft https://docs.microsoft.com/fr-fr/windows-hardware/drivers/devtest/determining-if-static-driver-verifier-supports-your-driver-or-library that states that: ?If you have a WDM driver or library and want to run SDV, the driver or library must not link to one of the following class framework libraries.? and the import lib fwpkclnt.lib is in the list.

The problem is that my driver is not a WDM driver, it is WDF, so this statement should not be applied to my project, but it appears that SDV somehow thinks that the driver is WDM even though everywhere in the settings it is KMDF.

Anyone seen a problem like this? Any hints or suggestions? Any help is appreciated on the matter!

Thanks,
With best regards,
Volodymyr