microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
6.94k stars 4.93k forks source link

Update filesys/nullfilter readme with deploy instructions #435

Open jamesmcguirepro opened 4 years ago

jamesmcguirepro commented 4 years ago

It would be very helpful if this provided basic instructions on getting the null filter built and deployed.

also, it's not currently compiling with VS2019:

1>------ Build started: Project: nullFilter, Configuration: Debug x64 ------
1>Building 'nullFilter' with toolset 'WindowsKernelModeDriver10.0' and the 'Universal' target platform.
1>Stamping x64\Debug\nullFilter.inf
1>Stamping [Version] section with DriverVer=10/30/2019,17.15.20.7
1>C:\Repos\Windows-driver-samples\filesys\miniFilter\nullFilter\nullFilter.inf : error 1420: [DefaultInstall]-based INF cannot be processed as Primitive.
1>C:\Repos\Windows-driver-samples\filesys\miniFilter\nullFilter\nullFilter.inf(25-25): error 1421: Section [DefaultInstall] should have an architecture decoration.
1>C:\Repos\Windows-driver-samples\filesys\miniFilter\nullFilter\nullFilter.inf(36-36): error 1421: Section [DefaultUninstall] should have an architecture decoration.
1>C:\Repos\Windows-driver-samples\filesys\miniFilter\nullFilter\nullFilter.inf(71-71): warning 1205: Section [NullFilter.DriverFiles] referenced from DelFiles and CopyFiles directive.
1>Done building project "nullFilter.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
HollisTech commented 4 years ago

This is really two issues, "build and deploy docs", and "doesn't compile with VS2019". The second issue is a major bug and should be its own issue.

corytodd commented 4 years ago

Have you (anyone) by any chance figured out how to get the minifilter examples working? I've read through all INF docs relating to the new required format and I think I'm close but these filters just won't load.

corytodd commented 4 years ago

I think I figured it out here: https://gist.github.com/corytodd/09d112f1d6eb2ba264a1a4ee736ed52c

If any of that looks incorrect/unsafe/etc please let me know. At least now the minifilters are loading and appear to be working.