Foreword Acknowledgments Chapter 1 Introduction AN OVERVIEW OF THE OPERATIONG SYSTEMS WINDOWS 2000 DRIVERS SAMPLE CODE ORGANIZATION OF THIS BOOK OTHER RESOURCES WARNING Chapter 2 Basic Structure of a WDM Driver DEVICE AND DRIVER LAYERING THE DRIVERENTRY ROUTINE THE ADDDEVICE ROUTINE WINDOWS 98 COMPATIBILITY NOTES Chapter 3 Basic Programming Techniques THE DERNEL-MODE PROGRAMMING ENVIRONMENT ERROR HANDLING MEMORY MANAGEMENT STRING HANDLING MISCELLANEOUS PROGRAMMING TECHNIQUES WINDOWS 98 COMPATIBILITY NOTES Chapter 4 Synchronization AN ARCHETYPAL SYNCHRONIZATION PROBLEM INTERRUPT REQUEST LEVEL SPIN LOCKS KERNEL DISPATCHER OBJECTS OTHER KERNEL-MODE SYNCHRONIZATION PRIMITIVES Chapter 5 The I/O Request Packet DATA STRUCTURES THE “STANDARD MODEL”FOR IRP PROCESSING COMPLETING I/O REQUESTS PASSING REQUESTS DOWN TO LOWER LEVELS CANCELLING I/O REQUESTS MANAGING YOUR OWN IRPS LOOSE ENDS Chapter 6 Plug and Play IRP_MJ_PNP DISPATCH FUNCTION STARTING AND STOPPING YOUR DEVICE MANAGING PNP STATE TRANSITIONS OTHER CONFIGURATION FUNCTIONALITY WINDOWS 98 COMPATIBILITY NOTES Chapter 7 Reading and Writing Data CONFIGURING YOUR DEVICE ADDRESSING A DATA BUFFER PORTS AND REGISTERS SERVICING AND INTERRUPT DIRECT MEMORY ACCESS Chapter 8 Power Management THE WDM POWER MODEL MANAGING POWER TRANSITIONS ADDITIONAL POWER MANAGEMENT DETAILS WINDOWS 98 COMPATIBILITY NOTES Chapter 9 Specialized Topics FILTER DRIVERS LOGGING ERRORS I/O CONTROL OPERATIONS SYSTEM THREADS EXECUTIVE WORK ITEMS WATCHDOG TIMERS WINDOWS 98 COMPATIBILITY NOTES Chapter 10 Windows Management Instrumentation WMI CONCEPTS WDM DRIVERS AND WMI USER-MODE APPLICATIONS AND WMI WINDOWS 98 COMPATIBILITY NOTES Chapter 11 The Universal Serial Bus PROGRAMMING ARCHITECTURE WORKING WITH THE BUS DRIVER Chapter 12 Installing Device Drivers THE INF FILE DEFINNG A DEVICE CLASS LAUNCHING AN APPLICATION WINDOWS 98 COMPATIBILITY NOTES Appendix A Coping with Windows 98 Incompatibilities DEFINNG STUBS FOR KERNEL-MODE ROUTINES DETERMINING THE OPERATING SYSTEM VERSION Appendix B Using GENERIC.SYS Appendix C Using WDMWIZ.AWX BASIC DRIVER INFORMATION DEVICELOCONTROL CODES I/O RESOURCES POWER CAPABILITIES USB ENDPOINTS WMI SUPPORT PARAMETERS FOR THE INF FILE NOW WHAT? Index