Prerequisites
Before building, ensure you have all build requirements installed:- Visual Studio 2019 or 2022
- Windows Driver Kit (WDK)
- Windows 10/11 SDK
Getting the Source Code
Clone the Repository
Repository Structure
Key directories:Opening the Solution
Main Driver Solution
- Navigate to
Virtual Display Driver (HDR)/ - Open
MttVDD.slnin Visual Studio - Visual Studio will load the driver project
There are two .sln files in the HDR directory. Use the one in the
MttVDD subdirectory for the main driver, or the root one which includes the same project.Selecting Build Configuration
Platform Selection
For most users: Select x64 platform- In Visual Studio, use the platform dropdown (toolbar)
- Select your target platform:
- x64 - Modern 64-bit systems (recommended)
- ARM64 - ARM-based Windows devices
- Win32 - Legacy 32-bit systems
Configuration Selection
-
Debug: For development and testing
- Includes debug symbols
- Enables additional logging
- Uses SHA1 signing (faster)
- Larger binary size
-
Release: For production use
- Optimized code
- Smaller binary size
- Uses SHA256 signing
- IddCx 1.10 with minimum version 3 required
Building the Driver
Standard Build
From Visual Studio:- Select your configuration (Debug/Release) and platform (x64/ARM64)
- Right-click the MttVDD project in Solution Explorer
- Select Build or press
Ctrl+Shift+B
Build Output Location
Compiled files are placed in:Build Artifacts
A successful build produces:- MttVDD.dll - Driver binary
- MttVDD.inf - Driver installation file
- MttVDD.cat - Catalog file (security)
- vdd_settings.xml - Configuration file (copied via post-build)
- MttVDD.pdb - Debug symbols (Debug builds)
Build Process Details
Compilation Steps
- WPP Preprocessing: Processes tracing macros in
Trace.h - C++ Compilation: Compiles
Driver.cppwith C++17 standard - PREfast Analysis: Runs static code analysis
- Linking: Links with UMDF and system libraries
- INF Processing: Processes driver installation file
- Catalog Creation: Creates security catalog
- Post-build: Copies
vdd_settings.xmlto output
Compiler Flags
Key compilation flags (Release x64):Include Paths
The build uses these include directories:- Windows SDK UMDF headers
- Windows SDK IddCx headers (version 1.10 for x64/ARM64)
- Third-party WDF headers (UMDF 2.15)
- Common project headers (
Common/Include)
Code Analysis
PREfast Static Analysis
Enabled by default:- Catches potential bugs at compile time
- Enforces driver coding standards
- Identifies security issues
Common Build Issues
Error C1083: Cannot open include file
Symptom:fatal error C1083: Cannot open include file: 'IddCx.h'
Cause: WDK not installed or paths not configured
Solution:
- Verify WDK installation
- Restart Visual Studio
- Check project properties → VC++ Directories → Include Directories
LNK2001: Unresolved external symbol
Symptom: Linker errors about missing symbols Cause: Missing library dependencies Solution:- Verify Additional Dependencies include:
OneCoreUAP.libavrt.libsetupapi.lib
- Check WDK library paths are configured
MSB8036: Windows SDK not found
Symptom: SDK version mismatch Solution:- Right-click project → Properties
- General → Windows SDK Version
- Select an installed SDK version or “Use latest”
- Rebuild
MIDL2011: Unresolved type declaration
Symptom: Interface definition errors Cause: UMDF/IddCx version mismatch Solution: Verify WDK version matches project requirements (IddCx 1.10)Post-build event failed
Symptom:copy "..\vdd_settings.xml" failed
Cause: vdd_settings.xml not found
Solution: Ensure vdd_settings.xml exists in the parent directory
Advanced Build Options
Building All Platforms
To build all platform configurations:Clean Build
Force a complete rebuild:Verbose Build Output
For detailed build diagnostics:Testing the Build
Verify Build Artifacts
After building, verify:- MttVDD.dll (~200-300 KB)
- MttVDD.inf
- MttVDD.cat
- vdd_settings.xml
Check Driver Properties
Right-click MttVDD.dll → Properties → Details:- File version should match your build
- Product name: “Virtual Display Driver”
Next Steps
Driver Signing
Sign your driver for installation and testing
Testing
Safely test your custom driver build
Building Additional Components
GetIddCx Utility
To build the IddCx version query tool:- Navigate to
Virtual Display Driver (HDR)/GetIddCx/ - Open the project or build from command line
- This utility helps identify installed IddCx versions
Community Scripts
PowerShell scripts inCommunity Scripts/ don’t require building but may be useful for:
- Automated driver installation
- Display configuration
- Testing utilities
Continuous Integration
For automated builds, see the GitHub Actions workflows in.github/workflows/ for examples of CI/CD configuration.