Developing Drivers with the Windows Driver Foundation: WDF Fundamentals
- 4/25/2007
- WDF and WDM
- What Is WDF?
- WDF Object Model
- I/O Model
- Plug and Play and Power Management
- Security
- WDF Verification, Tracing, and Debugging Support
- Serviceability and Versioning
Serviceability and Versioning
Serviceability is a common problem for drivers. When Microsoft releases a new version of Windows, driver vendors must test their drivers to ensure that they operate properly on the new release. Any driver that uses undocumented features—or that uses documented features in a nonstandard way—is likely to encounter compatibility problems from one Windows release to the next.
WDF drivers are less susceptible to such problems because Microsoft tests the frameworks on each new version of the operating system. This testing ensures that WDF drivers maintain consistent behavior from one release to the next.
To improve driver serviceability and help to prevent compatibility problems, WDF provides versioning and support for side-by-side operation of different framework major versions. Each release of the framework has a major and minor version number. A WDF driver always uses the major version for which it was built and tested. If a newer major version of the framework is installed, the older version runs side by side with the newer major version and WDF drivers continue to bind to the major version for which they were built.
WDF drivers specify the major and minor version of the framework that they were built for when they are compiled. When the driver is installed, it specifies the version of the framework that must be present on the system to meet the driver’s minimum requirements:
If the specified major version is not present on the user’s system, the WDF co-installer that is included in all WDF installation packages automatically installs the specified major version side by side with any older major versions.
If the specified minor version is more recent than the one on the user’s system, the WDF co-installer updates the framework to the newer minor version.
The older minor version is backed up, so that users can use System Restore to return to it, if necessary.
When a new minor version is installed on the system, the existing WDF drivers that use the same major version automatically bind to the new minor version. This means that a WDF driver binds to the most recent minor version of the major version against which the driver was compiled. This feature allows WDF drivers to benefit from bug fixes in minor versions.