Bewerken

Delen via


General driver samples

The samples in this directory provide a starting point for writing a custom driver for your device.

Sample Description
Cancel Safe IRP Queue Demonstrates the use of the cancel-safe queue routines IoCsqInitialize, IoCsqInsertIrp, IoCsqRemoveIrp, IoCsqRemoveNextIrp. By using these routines, driver developers do not have to worry about IRP cancellation race conditions.
KMDF Echo Demonstrates how to use a sequential queue to serialize read and write requests presented to the driver.
UMDF1 Echo Demonstrates how to use UMDF 1 to write a driver and to employ best practices.
UMDF2 Echo Demonstrates how to use UMDF 2 to write a driver and to employ best practices.
UMDF SocketEcho Sample (UMDF Version 1) Demonstrates how to use the UMDF to write a driver and demonstrates best practices.
Hardware Event Demonstrates two different ways a kernel-mode driver can notify an application about a hardware event. One way uses an event-based method, and the other uses an IRP-based method. The sample driver uses a timer DPC to simulate hardware events.
Non-PnP Driver Sample Demonstrates how to write a non-PnP driver using the Kernel Mode Driver Framework.
IOCTL Demonstrates the usage of four different types of IOCTLs (METHOD_IN_DIRECT, METHOD_OUT_DIRECT, METHOD_NEITHER, and METHOD_BUFFERED).
ObCallback Demonstrates the use of registered callbacks for process protection. The driver registers control callbacks which are called at process creation.
PCIDRV This sample demonstrates how to write a KMDF driver for a PCI device. The sample works with the Intel 82557/82558 based PCI Ethernet Adapter (10/100) and Intel compatibles.
Kernel Counter Demonstrates the use of the kernel-mode performance library. The driver does not control any hardware, it simply provides counters. The code contains comments to explain what each function does.
PLX9x5x PCI Driver Demonstrates how to write driver for a generic PCI device using Windows Driver Frameworks (WDF). The target hardware for this driver is PLX9656/9653RDK-LITE board.
RegFltr Shows how to write a registry filter driver.
Simple Media Source Demonstrates how to write a custom media source and driver package.
System DMA Demonstrates the usage of V3 System DMA. It shows how a driver could use a system DMA controller supported by Windows to write data to a hardware location using DMA.
Toaster Sample Driver An iterative series of samples that demonstrate fundamental aspects of Windows driver development for both Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) version 1.
Toaster Package Sample Simulates hardware-first and software-first installation of the toaster sample driver.
Toaster Sample (UMDF Version 2) An iterative series of samples that demonstrate fundamental aspects of Windows driver development using User-Mode Driver Framework (UMDF) version 2.
EventDrv A kernel-mode trace provider and driver. The driver does not control any hardware; it simply generates trace events. It is designed to demonstrate the use of the Event Tracing for Windows (ETW) API in a driver.
System Trace Control Demonstrates how to use event tracing control APIs to collect events from the system trace provider.
Tracedrv A sample driver instrumented for software tracing.
UMDF Driver Skeleton Demonstrates how to use the User-Mode Driver Framework to write a minimal driver and shows best practices.
Driver package installation toolkit for universal drivers Illustrates DCHU principles of universal driver design.