Kernel-Mode Driver Docs

Kernel-Mode Driver Overview

Kernel-mode drivers run in the privileged part of the Windows operating system, providing direct access to hardware and core OS services. This section covers the essential concepts, programming model, and best practices for creating robust, secure kernel drivers.

Key Topics

  • DriverEntry – The entry point for every driver.
  • I/O Request Packets (IRP) – Core communication mechanism between the I/O manager and drivers.
  • Device Objects & Symbolic Links – Exposing functionality to user-mode.
  • Power Management – Handling device power states.
  • Plug & Play (PnP) – Responding to hardware changes.
  • Synchronization – Managing concurrency safely.
  • Debugging & Tracing – Tools and techniques for driver development.

Quick Reference Table

ComponentHeaderTypical Functions
Driver Entryntddk.hDriverEntry, DriverUnload
IRP Handlingwdm.hDispatchRead, DispatchWrite, DispatchIoControl
Device Creationntddk.hIoCreateDevice, IoCreateSymbolicLink
Power Managementwdm.hPoRegisterDevice, PoRequestPowerIrp
Synchronizationntddk.hKeAcquireSpinLock, ExAcquireFastMutex
Debuggingwdfdebug.hDbgPrint, WPP Tracing

Getting Started

Explore the sub‑sections via the left navigation pane. Each topic provides in‑depth explanations, code snippets, and best‑practice guidelines.

For a complete driver sample, see Sample Code.