Developing Drivers with the Windows Driver Foundation: Dev Driver Win Driver Fou_p1

Developing Drivers with the Windows Driver Foundation: Dev Driver Win Driver Fou_p1

by Penny Orwick, Guy Smith

NOOK Book(eBook)

$27.99 $47.99 Save 42% Current price is $27.99, Original price is $47.99. You Save 42%.

Available on Compatible NOOK Devices and the free NOOK Apps.
WANT A NOOK?  Explore Now


Start developing robust drivers with expert guidance from the teams who developed Windows Driver Foundation. This comprehensive book gets you up to speed quickly and goes beyond the fundamentals to help you extend your Windows development skills. You get best practices, technical guidance, and extensive code samples to help you master the intricacies of the next-generation driver model—and simplify driver development.

Discover how to:

  • Use the Windows Driver Foundation to develop kernel-mode or user-mode drivers
  • Create drivers that support Plug and Play and power management—with minimal code
  • Implement robust I/O handling code
  • Effectively manage synchronization and concurrency in driver code
  • Develop user-mode drivers for protocol-based and serial-bus-based devices
  • Use USB-specific features of the frameworks to quickly develop drivers for USB devices
  • Design and implement kernel-mode drivers for DMA devices
  • Evaluate your drivers with source code analysis and static verification tools
  • Apply best practices to test, debug, and install drivers

  • PLUS—Get driver code samples on the Web

  • Product Details

    ISBN-13: 9780735645851
    Publisher: Pearson Education
    Publication date: 04/25/2007
    Series: Developer Reference
    Sold by: Barnes & Noble
    Format: NOOK Book
    Pages: 928
    File size: 5 MB

    About the Author

    Penny Orwick has been writing about Windows driver development since 1997. She has worked closely with the Windows Driver Foundation team since the early stages of development and has developed technical papers for the driver development community.

    Guy Smith is a writer specializing in device drivers and kernel-mode topics. He has more than a decade of experience developing programming documentation for Microsoft technologies, including Windows Shell, Internet Explorer and the Windows Presentation Foundation.

    The Microsoft Windows Driver Foundation team designs and supports driver frameworks for Windows.

    Table of Contents

    Part I: Getting Started with WDF;
    Chapter 1: Introduction to WDF;
    1.1 About This Book;
    1.2 Conventions Used in This Book;
    1.3 Getting Started with Driver Development;
    1.4 Key Information Sources;
    Chapter 2: Windows Driver Fundamentals;
    2.1 What Is a Driver?;
    2.2 Kernel Objects and Data Structures;
    2.3 The Windows I/O Model;
    2.4 About Plug and Play and Power Management;
    2.5 Basic Kernel-Mode Programming;
    2.6 Tips for Programming in Kernel Mode;
    2.7 A Basic Vocabulary;
    Chapter 3: WDF Fundamentals;
    3.1 WDF and WDM;
    3.2 What Is WDF?;
    3.3 WDF Object Model;
    3.4 I/O Model;
    3.5 Plug and Play and Power Management;
    3.6 Security;
    3.7 WDF Verification, Tracing, and Debugging Support;
    3.8 Serviceability and Versioning;
    Part II: Exploring the Frameworks;
    Chapter 4: Overview of the Driver Frameworks;
    4.1 The Frameworks: An Overview;
    4.2 UMDF Overview;
    4.3 KMDF Overview;
    4.4 WDF Architecture;
    4.5 UMDF Infrastructure;
    4.6 KMDF Infrastructure;
    4.7 Device and Driver Support in WDF;
    Chapter 5: WDF Object Model;
    5.1 Overview of the Object Model;
    5.2 UMDF Object Model Implementation;
    5.3 KMDF Object Model Implementation;
    5.4 Object Creation;
    5.5 Object Hierarchy and Lifetime;
    5.6 Object Context Areas;
    Chapter 6: Driver Structure and Initialization;
    6.1 Required Driver Components;
    6.2 Driver Object;
    6.3 Device Objects;
    6.4 Queues and Other Support Objects;
    6.5 Device Interfaces;
    6.6 UMDF Device Object Creation and Initialization;
    6.7 KMDF Device Object Creation and Initialization;
    6.8 Child Device Enumeration (KMDF PDOs Only);
    6.9 Device Naming Techniques for KMDF Drivers;
    Part III: Applying WDF Fundamentals;
    Chapter 7: Plug and Play and Power Management;
    7.1 Introduction to Plug and Play and Power Management;
    7.2 Plug and Play and Power Management Support in WDF;
    7.3 Callback Sequences for Plug and Play and Power Management;
    7.4 How to Implement Plug and Play and Power Management in WDF Drivers;
    7.5 Plug and Play and Power Management in Software-Only Drivers;
    7.6 Plug and Play and Power Management in Simple Hardware Drivers;
    7.7 Advanced Power Management for KMDF Drivers;
    Chapter 8: I/O Flow and Dispatching;
    8.1 Common I/O Request Types;
    8.2 I/O Transfer Types;
    8.3 I/O Request Flow;
    8.4 I/O Request Objects;
    8.5 I/O Queues;
    8.6 I/O Event Callbacks;
    8.7 Completing I/O Requests;
    8.8 Canceled and Suspended Requests;
    8.9 Adaptive Time-outs in UMDF;
    8.10 Self-Managed I/O;
    Chapter 9: I/O Targets;
    9.1 About I/O Targets;
    9.2 I/O Target Creation and Management;
    9.3 I/O Request Creation;
    9.4 Memory Objects and Buffers for Driver-Created I/O Requests;
    9.5 I/O Request Formatting;
    9.6 How to Send an I/O Request;
    9.7 File Handle I/O Targets in UMDF Drivers;
    9.8 USB I/O Targets;
    9.9 Guidelines for Sending I/O Requests;
    Chapter 10: Synchronization;
    10.1 When Synchronization Is Required;
    10.2 WDF Synchronization Features;
    10.3 Synchronization Scope and I/O Callback Serialization;
    10.4 KMDF Wait Locks and Spin Locks;
    10.5 Synchronization of I/O Request Cancellation in KMDF Drivers;
    10.6 Summary and General Tips for Synchronization;
    Chapter 11: Driver Tracing and Diagnosability;
    11.1 WPP Software Tracing Basics;
    11.2 Trace Message Functions and Macros;
    11.3 How to Support Software Tracing in a Driver;
    11.4 Tools for Software Tracing;
    11.5 How to Run a Software Trace Session;
    11.6 Best Practices: Design for Diagnosability;
    Chapter 12: WDF Support Objects;
    12.1 Memory Allocation;
    12.2 Registry Access;
    12.3 General Objects;
    12.4 KMDF Collection Objects;
    12.5 KMDF Timer Objects;
    12.6 WMI Support in a KMDF Driver;
    Chapter 13: UMDF Driver Template;
    13.1 A Description of the Skeleton Sample;
    13.2 How to Customize the Skeleton Sample Source Files;
    13.3 How to Customize the Skeleton Sample Build and Installation Support Files;
    Part IV: Additional Topics for KMDF Drivers;
    Chapter 14: Beyond the Frameworks;
    14.1 How to Use System Services Outside the Frameworks;
    14.2 How to Handle Requests that the Frameworks Do Not Support;
    Chapter 15: Scheduling, Thread Context, and IRQL;
    15.1 About Threads;
    15.2 Interrupt Request Levels;
    15.3 Thread Interruption Scenarios;
    15.4 Work Items and Driver Threads;
    15.5 Best Practices for Managing Thread Context and IRQL in KMDF Drivers;
    Chapter 16: Hardware Resources and Interrupts;
    16.1 Hardware Resources;
    16.2 Interrupts and Interrupt Handling;
    Chapter 17: Direct Memory Access;
    17.1 Basic DMA Concepts and Terminology;
    17.2 DMA-Specific Device Information;
    17.3 Windows DMA Abstraction;
    17.4 Implementing DMA Drivers;
    17.5 Testing DMA Drivers;
    17.6 Best Practices: Do's and Don'ts for DMA Drivers;
    Chapter 18: An Introduction to COM;
    18.1 Before Starting;
    18.2 UMDF Driver Structure;
    18.3 A Brief Overview of COM;
    18.4 How to Use UMDF COM Objects;
    18.5 How to Implement the DLL Infrastructure;
    18.6 How to Implement UMDF Callback Objects;
    Part V: Building, Installing, and Testing a WDF Driver;
    Chapter 19: How to Build WDF Drivers;
    19.1 General Build Considerations for Drivers;
    19.2 Introduction to Building Drivers;
    19.3 UMDF Example: Building the Fx2_Driver Sample;
    19.4 KMDF Example: Building the Osrusbfx2 Sample;
    Chapter 20: How to Install WDF Drivers;
    20.1 Driver Installation Basics;
    20.2 WDF Driver Installation Considerations;
    20.3 WDF Driver Package Components;
    20.4 How to Create an INF for a WDF Driver Package;
    20.5 Examples of WDF INFs;
    20.6 How to Sign and Distribute a Driver Package;
    20.7 How to Distribute the Driver Package;
    20.8 How to Install a Driver;
    20.9 How to Troubleshoot WDF Driver Installation Problems;
    Chapter 21: Tools for Testing WDF Drivers;
    21.1 Getting Started with Driver Testing;
    21.2 Driver Verifier;
    21.3 KMDF Verifier;
    21.4 UMDF Verifier;
    21.5 Application Verifier;
    21.6 Best Practices for Testing WDF Drivers;
    Chapter 22: How to Debug WDF Drivers;
    22.1 About WDF Debugging Tools;
    22.2 WinDbg Basics;
    22.3 How to Prepare for UMDF Debugging;
    22.4 How to Prepare for KMDF Debugging;
    22.5 UMDF Walkthrough: Debugging the Fx2_Driver Sample;
    22.6 KMDF Walkthrough: Debugging the Osrusbfx2 Sample;
    22.7 How to View Trace Messages with WinDbg;
    22.8 How to Use WinDbg to View the KMDF Log;
    22.9 More Suggestions for Experimenting with WinDbg;
    Chapter 23: PREfast for Drivers;
    23.1 Introduction to PREfast;
    23.2 How to Use PREfast;
    23.3 Coding Practices that Improve PREfast Results;
    23.4 How to Use Annotations;
    23.5 General-Purpose Annotations;
    23.6 Driver Annotations;
    23.7 How to Write and Debug Annotations;
    23.8 PREfast Best Practices;
    23.9 Example: Osrusbfx2.h with Annotations;
    Chapter 24: Static Driver Verifier;
    24.1 Introduction to SDV;
    24.2 How SDV Works;
    24.3 How to Annotate KMDF Driver Source Code for SDV;
    24.4 How to Run SDV;
    24.5 How to View SDV Reports;
    24.6 KMDF Rules for SDV;
    24.7 Example: Walkthrough SDV Analysis of Fail_Driver3;
    24.8 KMDF Callback Function Role Types for SDV;
    Microsoft Press Support Information;

    Customer Reviews