Featured image of post History of Windows Device Drivers

History of Windows Device Drivers

History of the APIS behind device drivers in windws


Blue screen of death
https://en.wikipedia.org/wiki/Blue_screen_of_death

Windows Device Drivers

Introduction

Ah, device drivers—those magical bits of software that let your computer talk to hardware without throwing a tantrum. Without them, your keyboard wouldn’t type, your mouse wouldn’t click, and your printer would just sit there judging you.

Over the years, Windows has gone from the Wild West of driver development (where anything goes and bluescreens were an Olympic sport) to a well-structured (but still occasionally chaotic) system.

The Prehistoric Era: Windows 1.0 to Windows 3.x (1985-1994)

Back in 1985, when big hair and synth music ruled the world, Windows 1.0 made its debut.

It wasn’t much of an operating system, more of a fancy UI sitting on top of MS-DOS. Device drivers at this stage?

They were basically handwritten in assembly, and good luck getting your peripherals to work without sacrificing a goat to the tech gods.

Then came Windows 3.0 and 3.1, bringing the Virtual Device Driver (VxD) model.

This allowed Windows to finally talk to hardware without crashing all the time.

VxDs could run in 32-bit protected mode, meaning fewer crashes! (Okay, fewer intentional crashes—badly written drivers still bricked systems regularly.)

Windows 95 - The Age of Plug and Pray (1995-2000)

Ah, Windows 95—the OS that made every home user feel like they were stepping into the future… right before their computer froze on the boot screen.

But it did introduce Plug and Play (PnP), which was supposed to make installing new hardware effortless.

Spoiler: it didn’t.

It was more like Plug and Pray, because sometimes your new sound card would install perfectly, and other times it would crash your system into oblivion.

This era still relied heavily on VxDs, but by the time Windows 98 and Windows ME (Millennium Edition) rolled around, Microsoft realized that having drivers that could randomly go rogue wasn’t ideal.

So, they started planning something more structured…

Enter Windows NT and the Windows Driver Model (WDM) (1993-2000)

Meanwhile, in the corporate world, Windows NT was taking shape.

NT was like the responsible older sibling—serious, stable, and didn’t party too hard. It introduced the Windows NT Driver Model (NTDM), which was way more stable than VxDs.

But Microsoft wasn’t done yet.

In Windows 2000, they merged the driver models from Windows 9x and NT into a single framework: the Windows Driver Model (WDM).

This meant that developers didn’t have to write separate drivers for each Windows version.

Here’s how a super basic WDM driver looked:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include <ntddk.h>

NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) {
    DbgPrint("Hello from a Windows Driver!\n");
    return STATUS_SUCCESS;
}

void UnloadDriver(PDRIVER_OBJECT DriverObject) {
    DbgPrint("Goodbye from the driver!\n");
}

This little guy would load into Windows, say “hi,” and then crash the system if you forgot to unload it properly. Good times.

Windows XP to Windows 7 - The Golden Age of Stability (2001-2015)

Windows XP was the OS—rock-solid (by early 2000s standards), driver support was decent, and it lasted for what felt like an eternity (seriously, people were still running XP in 2020).

WDM continued to evolve, but Microsoft wanted something even better.

Enter the Windows Driver Foundation (WDF), which introduced:

  • Kernel-Mode Driver Framework (KMDF): For hardware that needed deep system access (like graphics and network drivers).
  • User-Mode Driver Framework (UMDF): For more “chill” hardware that didn’t need to run at nuclear launch-code security levels.

Here’s a basic KMDF driver:

1
2
3
4
5
6
7
8
#include <ntddk.h>
#include <wdf.h>

NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) {
    WDF_DRIVER_CONFIG config;
    WDF_DRIVER_CONFIG_INIT(&config, WDF_NO_EVENT_CALLBACK);
    return WdfDriverCreate(DriverObject, RegistryPath, WDF_NO_OBJECT_ATTRIBUTES, &config, WDF_NO_HANDLE);
}

Microsoft also tightened up security—now, drivers had to be signed, meaning no more random sketchy drivers from floppy disks labeled “Trust Me.exe.”

Windows 10 to Present - The Age of Updates Breaking Everything (2015-Present)

With Windows 10, Microsoft decided that everyone should always be running the latest version (whether they wanted to or not). This led to the Universal Windows Driver (UWD) model, which promised:

  • One driver to rule them all (PCs, tablets, even fridges running Windows IoT).
  • Better security (because apparently, people were still writing drivers that crashed entire systems in 2019).
  • Mandatory driver updates (which sometimes broke everything, making people rage-quit to Linux).

The Windows Driver Kit (WDK) now integrates MUCH BETTER (!!!!!!!!!) with Visual Studio, making it easier for devs to create drivers that hopefully don’t BSOD the entire OS.

References