GDCL Home About GDCL DirectShow WinNt & WDM
GDCL Home / Technology / Drivers / WDM Details

Windows Driver Model

Windows 98 and Windows 2000 (formerly Windows NT 5) share a common driver model known as WDM. This is based on the original Windows NT driver model, with modifications to support Plug and Play, and is used for most multimedia device types and many other newer device types such as USB and 1394 devices.

A WDM driver is loaded and unloaded dynamically based on entries in the registry. It is called by the plug-and-play manager to create, start and stop devices that have been detected. The plug-and-play manager works out which driver should own a device using INF files similar to those on Windows 95. The driver is then sent i/o requests in IRPs or i/o request packets which can be queued and processed asynchronously.

A set of kernel-mode APIs (defined in wdm.h in the Windows 98 ddk) provided by a number of components provide access to most services that a driver would need. This makes WDM much more flexible than other driver models common to Windows 9x and Windows NT (such as NDIS and SCSI) where the driver could only call a limited set of services within a class driver layer.

WDM drivers can layer devices so that a higher level device can intercept requests sent to a lower level device or can implement its functionality by using lower-level drivers. This is used heavily in WDM: for example, bus functionality that was provided by the HAL component in Windows NT 4 is provided by a lower-level physical device object in WDM, on top of which your driver's functional device object is stacked.

Microsoft has made use of the device layering mechanisms to provide a kernel-mode streaming mechanism similar to DirectShow, where the graph of DirectShow filters is replaced by a stack of WDM device objects. WDM Streaming is functionally equivalent to DirectShow, and is based on WDM. It is being used for multimedia devices such as audio hardware and video capture, and may extend into other areas over time.

Device Driver Topics

WDM Drivers
Kernel Streaming
KS Minidriver Models
Windows NT Drivers
Video Capture