Overview
The GetIddCx utility (IddCxVersionQuery.cpp) provides functionality to determine the Indirect Display Driver Class eXtension (IddCx) version available on a given Windows system based on its build number.
Purpose
IddCx is the framework used for developing indirect display drivers in Windows. Different Windows versions support different IddCx versions, which provide varying capabilities and APIs. This utility helps:- Identify the IddCx version available on the current system
- Map Windows build numbers to corresponding IddCx versions
- Verify IddCx availability before driver initialization
Core Data Structures
IddCxVersionInfo
Stores version information for a specific Windows build:Version Mapping
The utility maintains a comprehensive map of Windows build numbers to IddCx versions:| Windows Version | Build Number | IddCx Version | Version Value |
|---|---|---|---|
| Windows 11 24H2 | 26100 | 1.10 | 0x1A80 |
| Windows 11 23H2 | 22631 | 1.10 | 0x1A00 |
| Windows 11 22H2 | 22621 | 1.9 | 0x1900 |
| Windows 11 21H2 | 22000 | 1.8 | 0x1800 |
| Windows 10 22H2 | 19045 | 1.5 | 0x1500 |
| Windows 10 21H2 | 19044 | 1.5 | 0x1500 |
| Windows 10 20H2 | 19042 | 1.5 | 0x1500 |
| Windows 10 RS5 | 17763 | 1.3 | 0x1300 |
| Windows 10 Creators Update | 15063 | 1.2 | 0x1200 |
| Windows 10 Anniversary Update | 14393 | 1.0 | 0x1000 |
Key Functions
GetWindowsBuildNumber
Retrieves the current Windows build number using the nativeRtlGetVersion function:
- Uses
ntdll.dllandRtlGetVersionto bypass version lies - More reliable than deprecated
GetVersionExAPI - Returns actual build number without manifesting
GetIddCxVersionFromBuild
Maps a Windows build number to its corresponding IddCx version information:buildNumber: Windows build number to query
IddCxVersionInfo structure with version details, or unknown version info if build is not recognized.
Algorithm:
- Attempts exact match lookup in version map
- Falls back to finding the closest lower build number
- Returns unknown version info if build predates IddCx (< 14393)
Runtime Version Detection
In the driver code, you can query the actual IddCx version at runtime using the IddCx API:Usage in Driver
The version information is critical for:- Feature Detection: Conditionally enabling features based on IddCx version
- API Compatibility: Using version-specific callbacks and structures
- Diagnostics: Logging version information for troubleshooting
IddCx Version History
Key features introduced in each version:- 1.0 (Windows 10 Anniversary Update): Initial IddCx release
- 1.2 (Windows 10 Creators Update): Enhanced mode enumeration
- 1.3 (Windows 10 RS3+): Improved cursor support
- 1.4 (Windows 10 19H1): SwapChainReleaseAndAcquireBuffer2 API
- 1.5 (Windows 10 20H1): Enhanced diagnostics
- 1.8 (Windows 11 21H2): HDR metadata support
- 1.9 (Windows 11 22H2): MonitorQueryTargetModes2
- 1.10 (Windows 11 23H2+): Gamma ramp and advanced color support
References
- Source File:
~/workspace/source/Virtual Display Driver (HDR)/GetIddCx/IddCxVersionQuery.cpp - MSDN Documentation: Indirect Display Driver Model