Cover Page
LOC Page
Acknowledgments
Introduction
Who Should Read This Book
Organization of This Book
Driver Security and Reliability
Sample Files
System Requirements
Support
Other Resources
Chapter 1: Beginning a Driver Project
A Brief History of Device Drivers
An Overview of the Operating Systems
What Kind of Driver Do I Need?
Management Overview and Checklist
Chapter 2: Basic Structure of a WDM Driver
How Drivers Work
How the System Finds and Loads Drivers
The Two Basic Data Structures
The DriverEntry Routine
The AddDevice Routine
Windows 98/Me Compatibility Notes
Chapter 3: Basic Programming Techniques
The Kernel-Mode Programming Environment
Error Handling
Memory Management
String Handling
Miscellaneous Programming Techniques
Windows 98/Me Compatibility Notes
Chapter 4: Synchronization
An Archetypal Synchronization Problem
Interrupt Request Level
Spin Locks
Kernel Dispatcher Objects
Other Kernel-Mode Synchronization Primitives
Windows 98/Me Compatibility Notes
Chapter 5: The I/O Request Packet
Data Structures
The "Standard Model" for IRP Processing
Completion Routines
Queuing I/O Requests
Cancelling I/O Requests
Summary--Eight IRP-Handling Scenarios
Chapter 6: Plug and Play for Function Drivers
IRP_MJ_PNP Dispatch Function
Starting and Stopping Your Device
Managing PnP State Transitions
Other Configuration Functionality
Windows 98/Me Compatibility Notes
Chapter 7: Reading and Writing Data
Configuring Your Device
Addressing a Data Buffer
Ports and Registers
Servicing an Interrupt
Direct Memory Access
Chapter 8: Power Management
The WDM Power Model
Managing Power Transitions
Additional Power-Management Details
Windows 98/Me Compatibility Notes
Chapter 9: I/O Control Operations
The DeviceIoControl API
Handling IRP_MJ_DEVICE_CONTROL
Internal I/O Control Operations
Notifying Applications of Interesting Events
Windows 98/Me Compatibility Notes
Chapter 10: Windows Management Instrumentation
WMI Concepts
WDM Drivers and WMI
Windows 98/Me Compatibility Notes
Chapter 11: Controller and Multifunction Devices
Overall Architecture
Handling PnP Requests
Handling Power Requests
Handling Child Device Resources
Chapter 12: The Universal Serial Bus
Programming Architecture
Working with the Bus Driver
Chapter 13: Human Interface Devices
Drivers for HID Devices
Reports and Report Descriptors
HIDCLASS Minidrivers
Windows 98/Me Compatibility Notes
Chapter 14: Specialized Topics
Logging Errors
System Threads
Work Items
Watchdog Timers
Windows 98/Me Compatibility Notes
Chapter 15: Distributing Device Drivers
The Role of the Registry
The INF File
Defining a Device Class
Customizing Setup
The Windows Hardware Quality Lab
Windows 98/Me Compatibility Notes
Chapter 16: Filter Drivers
The Role of a Filter Driver
Mechanics of a Filter Driver
Installing a Filter Driver
Case Studies
Windows 98/Me Compatibility Notes
Appendix A: Coping with Cross-Platform Incompatibilities
Determining the Operating System Version
Run-Time Dynamic Linking
Checking Platform Compatibility
Defining Win98/Me Stubs for Kernel-Mode Routines
Appendix B: Using WDMWIZ.AWX
Basic Driver Information
DeviceIoControl Codes
I/O Resources
USB Endpoints
WMI Support
Parameters for the INF File
Now What?
About the Author
About This eBook