Building common drivers For Different Versions

Hi All,

I have a Kernel Mode Driver project for Windows 10 and above using “Target OS version Windows 10”,
I use WDK10 and Visual Studio 2015.
Now I want to build the COMMON DRIVER for 2008 R2 and Windows 10 onwards.
I know I must build driver for x86 and x64 separately. but checking for building common driver Windows 2008 R2 onwards.
I checked with msdn suggestion for COMMON DRIVER for Windows 7 onwards,
https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/platforms-and-driver-versions
https://www.osronline.com/showthread.cfm?link=282666
Build driver using “Target OS Windows 10”, by specifieing dynamic function pointers, and overriding “C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\km\x64\BufferOverflowK.lib” for Windows 2008 R2

My driver got up and running, but I am facing issue while unloading facing crash(verifier enabled) for FwpsInjectionHandleDestroy with nullptr.

I wanted to know whether I am following correct approach, or am I missing anything?
Code path is same as earlier despite of function pointers for “FwpsCalloutRegister” and “KeInitializeSpinLock”.

Any help really appriciated.

Thanks,
Sachin Shinde.

Sorry I forgot to mention, its KMDF driver.

The “safe” way to target older platforms is to go into the project
properties and change the target to Windows 7 (under Driver Settings). Now
you’ll get compile time errors if you’re doing something that doesn’t
work/exist on newer platforms. Yes, this makes it difficult to dynamically
take advantage of newer features.

If you target Win10, you get no compile time checking so the driver may or
may not load on Win7 and things may or may not work at runtime. You need to
decide if this risk if worth it for you to achieve a single binary (these
days I’m personally not as convinced as I used to be that a single binary is
important).

As for your particular crash, I have no idea if this is caused by the build
environment, you need to debug it more. Also WFP related problems are better
asked on NTDEV, this list is for file system and file system filter
development.

-scott
OSR
@OSRDrivers

“%%merge inmail_.HdrFrom_%%” wrote in message news:xxxxx@ntfsd…

Hi All,

I have a Kernel Mode Driver project for Windows 10 and above using “Target
OS version Windows 10”,
I use WDK10 and Visual Studio 2015.
Now I want to build the COMMON DRIVER for 2008 R2 and Windows 10 onwards.
I know I must build driver for x86 and x64 separately. but checking for
building common driver Windows 2008 R2 onwards.
I checked with msdn suggestion for COMMON DRIVER for Windows 7 onwards,
https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/platforms-and-driver-versions
https://www.osronline.com/showthread.cfm?link=282666
Build driver using “Target OS Windows 10”, by specifieing dynamic function
pointers, and overriding “C:\Program Files (x86)\Windows
Kits\10\Lib\10.0.10586.0\km\x64\BufferOverflowK.lib” for Windows 2008 R2

My driver got up and running, but I am facing issue while unloading facing
crash(verifier enabled) for FwpsInjectionHandleDestroy with nullptr.

I wanted to know whether I am following correct approach, or am I missing
anything?
Code path is same as earlier despite of function pointers for
“FwpsCalloutRegister” and “KeInitializeSpinLock”.

Any help really appriciated.

Thanks,
Sachin Shinde.

Thanks Scott for your suggestion. Will post to correct list “WFP” related queries.