Getting Started with Universal Windows drivers

Universal Windows drivers enable developers to create a single driver package that runs across multiple different device types, from embedded systems to tablets and desktop PCs.

A Universal Windows driver is a driver package that contains an INF file and binaries that will install and run on Universal Windows Platform (UWP) based editions of Windows 10, such as Windows 10 for desktop editions (Home, Pro, and Enterprise), Windows 10 S, Windows 10 Mobile, Windows 10 IoT Core, Windows Server 2016, as well as other Windows 10 editions that share a common set of interfaces.

A Universal INF file is an INF file that only uses the subset of INF syntax that is supported on UWP-based editions of Windows 10.

Any binaries referenced by the Universal INF file must use only device driver interfaces (DDI) that are included in UWP-based editions of Windows 10. These DDIs are marked as Universal on the corresponding documentation reference pages. The driver binary can use KMDF, UMDF 2 or the Windows Driver Model (WDM).

Other binaries contained in your Universal Windows driver must pass the API validation tests.

Design Principles

When you write a universal driver package, there are four design principles to consider:

  • Declarative: Use directives in the INF file for installation operations and not extension points such as co-installers, RegisterDlls, etc.
  • Componentized: System and/or OEM-specific customizations are in an extension INF driver package separate from the primary driver package, facilitating independent updates of different components owned by different organizations.
  • Hardware Support Apps (HSA): Use custom capabilities to associate a hardware-specific UWP (Universal Windows Platform) application with your driver. The resulting app can be delivered and serviced from the Microsoft Store.
  • Universal API compliance: Binaries in the universal driver package only call APIs and DDIs that are included in the OneCore subset. INF files use only universal INF syntax.

Below, you'll find requirements and recommendations related to these principles. Also check out Universal Driver Scenarios, which describes how the DCHU universal driver sample applies the DCHU design principles.

Requirements

The following are required when writing a universal driver package:

  • Create a universal INF file for your driver:
    1. Review the list of INF sections and directives that are valid in universal driver packages in Using a Universal INF File.
    2. Use the InfVerif tool to verify that your driver package's INF file is universal.
  • Use the ApiValidator tool to verify that the APIs your binaries call are valid for a universal driver package. See Validating Universal Windows drivers.

Best Practices

Use the following best practices: