Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nullFilter: VS2022 compatibility and best practices by default #999

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olljanat
Copy link

I have been building Minifilter driver lately and was supriced how much issues there are on existing samples and challenges which developers have faced because of it (there is multiple issues because of it in here and other forums).

This PR updates nullFilter sample in way that:

  • It can be build with Visual Studio 2022 and it as result there is zero warnings.
  • Removed deprecated Win32 support which is not compatible with VS2022.
  • INF uses latest standard but still include legacy compatibility for those who needs that.
  • Latest C and C++ standards are followed.
  • Code analysis runs with "Microsoft All Rules" on every build as highly recommended in here
  • Remote deployment can be used.
  • Driver verification is on with all rules enabled in on like highly recommended in here
  • BypassIO support is enabled in INF file as instructed in here
  • ntstrsafe.h is used instead of dontuse.h. This driver actually don't need that at all but as this is sample it is good idea to share correct way on it.
  • It attach automatically to all volumes automatically so it can be used with HLK tests.

In addition that this provides better starting point for developers, I did find it also useful to verify that my HLK Client machines are working correctly as cases like File IO 2 Tests needs very special configuration.

* Updated INF to be compatible with latest standard
* Using ntstrsafe.h instead of dontuse.h
* Follow latest C and C++ standards
* Support remote deployment and enable driver verification
* Run code analysis with "Microsoft All Rules" on every build
* Removed wildcards from project file which are not compatible with
  Visual Studio
* Added BypassIO support
* Removed deprecated Win32 support
* Attach to all volumes by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant