Microsoft Learn

Windows User-Mode Driver Framework (UMDF)

The Windows User-Mode Driver Framework (UMDF) enables you to develop drivers that run in user mode rather than kernel mode. This offers several advantages, including increased stability and security, easier debugging, and faster development cycles. UMDF is built on top of the Windows Driver Model (WDM) and provides an object-oriented programming model that simplifies driver development.

Key Concepts in UMDF Development

Driver Objects and Components

UMDF drivers are composed of several key objects:

Driver Model

UMDF follows an event-driven model. Your driver registers callbacks for various device and I/O events, and the framework invokes these callbacks when the corresponding events occur.

Getting Started with UMDF

To begin developing UMDF drivers, you'll need:

The framework simplifies many aspects of driver development, including I/O handling, power management, and Plug and Play notifications.

Benefits of User-Mode Drivers

Further Resources

Explore the following sections for detailed information:

Example: Basic Driver Structure

A minimal UMDF driver typically involves:


// DriverEntry function
NTSTATUS DriverEntry(
    _In_ PDRIVER_OBJECT  DriverObject,
    _In_ PUNICODE_STRING RegistryPath
    );

// Callback for driver initialization
HRESULT STDMETHODCALLTYPE
OnDriverInitialized(
    _In_ IWDFDriver* WdfDriver
    );
            

UMDF Versions

UMDF has evolved over different Windows versions. Ensure you are aware of the UMDF version you are targeting for compatibility and feature sets.

Key UMDF APIs

Interface Description
IWDFDriver Represents the UMDF driver object.
IWDFDevice Represents a device managed by the driver.
IWDFIoRequest Represents an I/O request.
IWDFInterrupt Represents a hardware interrupt.