Export Driver compile error: can't open wdf.h

I’m trying to create an export driver but I can’t compile it, I keep getting the following error: “Cannot open include file:wdf.h”

This might look like a duplicate but the solution offered there didn’t work for me.

Anyway here’s how I’m creating this export driver.

  • First I created a normal KMDF in visual studio
  • Then I change the type of driver in: Project->Properties->Driver Setting->Driver Model

The funny thing is that if I change it back to type KMDF it compiles fine.

What’s happening and how do I go about compiling this?

What did you change the driver model to and why? <wdf.h> is the base include file for KMDF. If you’re not creating a KMDF driver, then you won’t use <wdf.h>.

1 Like

To follow up, you can’t write an export driver with KMDF. KMDF bases everything on the driver object, and an export-only driver doesn’t have one.

https://community.osr.com/discussion/106814/does-kmdf-support-export-drivers

1 Like