Framework Device Object
Warning
UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2.
The archived UMDF 1 samples can be found in the Windows 11, version 22H2 - May 2022 Driver Samples Update.
For more info, see Getting Started with UMDF.
The framework device object is exposed to drivers by the IWDFDevice interface. The framework device object is the framework representation of the device on the system. Each device object has a parent driver object.
When a new device arrives in the system, the framework calls the IDriverEntry::OnDeviceAdd method to notify the driver of the arrival and passes the IWDFDriver and IWDFDeviceInitialize interfaces in the call. The driver can call methods of the IWDFDeviceInitialize interface to initialize the new device. For example, the driver calls the IWDFDeviceInitialize::RetrieveDevicePropertyStore method to query for the device information that is provided as part of device installation. The driver can then call the IWDFDriver::CreateDevice method to configure and create the device object.
When drivers create a framework device object, they can register their IPnpCallback, IPnpCallbackSelfManagedIo, IPnpCallbackHardware, IFileCallbackCleanup, and IFileCallbackClose interfaces. The framework then notifies the driver when file cleanup and close and Plug and Play (PnP) and power management (PM) events occur. For more information about supporting PnP and PM, see PnP and Power Management in UMDF-based Drivers.