dealpapa Posted October 27, 2018 Report Share Posted October 27, 2018 Getting Started with Universal Windows drivers 04/19/2018 3 minutes to read Contributors all 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 package contains an INF file and binaries that install and run on Universal Windows Platform (UWP) based editions of Windows 10 as well as other Windows 10 editions that share a common set of interfaces. The driver binary can use KMDF, UMDF 2 or the Windows Driver Model (WDM). A universal driver consists of the following parts: a base driver, optional component packages, and an optional hardware support app. The base driver contains all core functionality and shared code. Separately, optional component packages can contain customizations and additional settings. Typically, a device manufacturer (IHV) writes the base driver, and a system builder (OEM) provides any optional component packages. After IHV has certified the base driver, it can be deployed on all OEM systems. Because a base driver can be used across all systems that share a hardware part, Microsoft can test the base driver broadly via Windows Insider flighting, rather than limiting distribution to specific machines. The OEM validates only the optional customizations that it provides for the OEM device. Universal drivers are distributed through Windows Update, and hardware support apps are distributed through the Store. Design Principles When you write a universal driver package, there are four design principles to consider: Declarative ("D"): Install the driver using only declarative INF directives and do not include any co-installers, RegisterDlls, etc. Componentized ("C"): Edition-specific, OEM-specific and optional customizations to the driver are separate from the base driver package, so that the base driver, which provides only core device functionality, can be targeted, flighted and serviced independently from the customizations. Hardware Support Apps ("H"): Any user interface (UI) component associated with a universal driver must be packaged as a Hardware Support App (HSA) or preinstalled on the OEM device. An HSA is an optional device-specific app that is paired with a driver. The application can be a Universal Windows Platform (UWP) or a Desktop Bridge app. You must distribute and update an HSA through the Microsoft Store. For details, see Hardware Support App (HSA): Steps for Driver Developers and Hardware Support App (HSA): Steps for App Developers. Universal API compliance ("U"): Binaries in the universal driver package only call APIs and DDIs that are included in UWP-based editions of Windows 10. These DDIs are marked as Universal on the corresponding documentation reference pages. INF files use only universal INF syntax. In the documentation, we use the acronym DCHU to refer to the above principles. Below, you'll find guidance on how to make your driver package DCHU-compliant. Also check out Universal Driver Scenarios, which describes how the DCHU universal driver sampleapplies the DCHU design principles. Requirements The following are required when writing a universal driver package: Create a universal INF file for your driver: Review the list of INF sections and directives that are valid in universal driver packages. 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. Best Practices If you are using the WDK with Visual Studio, set the Target Platform value in the driver project properties to Universal. This will automatically add the correct libraries, as well as running the Universal INF validation and APIValidator as a part of build. To do this: Open the driver project properties. Select Driver Settings. Use the drop-down menu to set Target Platform to Universal. If your INF performs any custom setup actions that depend on the target platform, consider separating them out into an extension INF. You can update an extension INF independently from the base driver package to improve robustness and servicing. See Using an Extension INF File. If you would like to provide an application that works with your device, please provide a UWP app. For details, see Hardware Support App (HSA): Steps for Driver Developers. An OEM can pre-load such an app using DISM - Deployment Image Servicing and Management. Alternatively, users can manually download the app from the Microsoft Store. In the INF DestinationDirs Section, set the destination directories to dirid 13 to make the driver run from the Driver Store. This will not work for some devices. Submit your universal driver package for certification in the Windows Hardware Compatibility Program. See these topics for more details: Create a new hardware submission Managing hardware submissions in the Windows Hardware Dev Center dashboard Get drivers signed by Microsoft for multiple Windows versions Driver flighting Link to comment Share on other sites More sharing options...
Recommended Posts