A minimal Visual Studio 2022 driver project template that shows how to configure a driver solution to use modern C++ language features and standard C++ headers.
- Visual Studio 2022 with C++ workload installed.
- Windows Driver Kit (WDK) matching your target Windows version (install WDK for VS2022).
You can use the C++ language and many header-only parts of the standard library, but you must not depend on exceptions or RTTI.
The projects in this template are configured to place build outputs, intermediate files and any generated files into out-of-source build directories (bin/, lib/, obj/). Thus the sources remain uncluttered.
This repository is intentionally small; add shared headers and third‑party libraries following the conventions below.
-
Driver/
The driver project. Contains the Visual Studio project and the precompiled header used by the driver:Driver.vcxproj,driver.vcxproj.filters— project files.Driver.rc— resource file with version, company and product info.StdAfx.h,StdAfx.cpp— precompiled header that includesntddk.hand commonly used C++ headers.Main.cpp, other driver sources.
-
include/(recommended)
Place common, cross-project headers here (public headers you expect multiple projects to include). Examples:include/foo.hinclude/helpers/util.h
-
3rd-party/(recommended)
Put third‑party libraries here, organized per dependency:3rd-party/<lib>/include/— headers3rd-party/<lib>/lib/<arch>/— prebuilt binaries (if any)
Keep third‑party code isolated and record licenses in3rd-party/<lib>/LICENSE.
-
props/
Centralize common MSBuild / Visual Studio settings in a shared props file so every project uses the same include paths, flags and PCH configuration. The magic of enabling standard C++ headers happens inprops/Driver.props -
.editorconfigVisual Studio reads.editorconfigautomatically from the solution folder and enforces basic formatting and editor behavior.