Microsoft Windows 2000驱动程序设计指南:英文

Microsoft Windows 2000驱动程序设计指南:英文
作 者: Microsoft公司著
出版社: 北京大学出版社
丛编项: 微软Windows 2000驱动程序开发丛书
版权说明: 本书为出版图书,暂不支持在线阅读,请支持正版图书
标 签: Windows
ISBN 出版时间 包装 开本 页数 字数
未知 暂无 暂无 未知 0 暂无

作者简介

暂缺《Microsoft Windows 2000驱动程序设计指南:英文》作者简介

内容简介

本书是《微软Windows 2000驱动程序开发丛书(影印版)》之一,讲述编写Windows 2000与Windows 98驱动程序所需的各种技术。主要内容有:驱动程序开发环境与驱动程序BUILD实用程序,应用Windows 2000驱动程序检验器建立、测试和调试Windows 2000驱动程序,创建WDM驱动程序,Windows 2000特殊的即插即用和电源管理特性,如何支持设备的设置和安装,以及编写内核模式、图形和网络驱动程序。本书由微软公司的专家编写,技术深入,权威性强,是Windows 2000驱动程序开发人员必备的参考书。

图书目录

Using This Documentation

Documentation Roadmap

Using This Documentation Online

Documentation Conventions

Section 1 Driver Writer’s Guide

Chapter 1 Driver Development Environment

1.1 Free Build and Checked Build

1.2 Debugging Environment

Chapter 2 testing Drivers

2.1 Driver Verifier

2.1.1 Capabilities Of Driver Verifier

2.1.2 Capabilities of Driver Verifier for Graphics Drivers

2.1.3 Activating and Monitoring Driver Verifier

Section 2 Plug and Play, Power Management, and Setup Design guide

Part 1 Requirements for Plug and Play and Power Management

Chapter 1 Introduction to Plug and Play and Power Management

1.1 What Is Plug and Play?

1.1.1 PnP Components

1.1.2 Levels of Support for PnP

1.2 What Is Power Management?

1.2.1 Industry Initiatives for Power Management

1.2.2 Levels of Support for Power Management

1.2.3 System-Wide Overview of Power Management

1.2.4 Power States

1.3 Device Tree

1.4 Driver Layers and Device Objects

1.4.1 Kinds of Drivers

1.4.2 Driver Layers-An Example

1.4.3 Kinds of Device Objects

1.4.4 Device Objects-An Example

Chapter 2 Required Driver Support for PnP and Power Management

2.1 Overview of Required PnP Support

2.2 PnP and Power Management DriverEntry Routine

2.3 PnP and Power Management AddDevice Routine

2.3.1 Guidelines for Writing AddDevice Routines

2.4 The DispatchPnP Routine

2.5 The DispatchPower Routine

2.6 PnP and Power Management Unload Routine

Part 2 Plug and Play

Chapter 1 Understanding PnP

1.1 PnP Driver Design Guidelines

1.2 PnP and the Device Tree

1.3 PnP Device States

1.4 Dynamically Adding a New PnP Device

1.5 HardWare Resources

1.5.1 Logical Configurations

1.6 Using GUIDs in Drivers

1.6.1 Defining and Exporting New GUIDs

1.6.2 Including GUIDs in Driver Code

Chapter 2 Rules for Handling Plug and Play IRPs

2.1 PnP IRP Requirements

2.2 Passing PnP IRPs Down the Device Stack

2.3 Postponing PnP IRP Processing Until Lower Drivers Finish

Chapter 3 Starting, Stopping, and Removing Devices

3.1 Starting a Device

3.1.1 Starting a Device in a Function Driver

3.1.2 Starting a Device in a Filter Driver

3.1.3 Starting a Device in a Bus Driver

3.1.4 Start Device Design Considerations

3.2 Stopping a Device for Resource Rebalancing

3.2.1 Understanding When Stop IRPs Are Issued

3.2.2 Handling an IRP_MN_OUERY_STOP_DEVICE Request

3.2.3 Handling an IRP_STOP_DEVICE Request

3.2.4 Handling an IRP_,NN_CANCEL_STOP_DEVICE Request

3.2.5 Holding Incoming IRPs When a Device Is Paused

3.3 Removing a Device

3.3.1 Understanding When Remove IRPs Are Issued

3.3.2 Handling an IRP_MN_QUERY_REMOVE_DEVICE Request

3.3.3 Handling an IRP_MN_QREMOVE_DEVICE Request

3.3.4 Handling an IRP_MN_CANCEL_REMOVE_DEVICE Request

3.3.5 Handling an IRP_MN_SURPRISE_REMOVAL Reqest

ChaPter 4 Using PnP Notification

4.1 PnP Notification Overview

4.2 Guidelines for Writing PnP Notification Callback Routines

4.3 Using PnP Device Interface Change Notification

4.3.1 Registering for Device Interface Change Notification

4.3.2 Handling Device Interface Change Events

4.4 Using PnP Target Device Change Notification

4.4.1 Registering for Target Device Change Notification

4.4.2 Handling a GUID_TARGET_DEVICE_QUERY_REMOVE Event

4.4.3 Handling a GUID_TARGET_DEVICE_REMOVE_COMPLETE Event

4.4.4 Handling a GUID_TARGET_DEVICE_REMOVE_CANCELLED Event

4.5 Using PnP Hardware Profile Change Notification

4.5.1 Registering for Hardware Profile Change Notification

4.5.2 Handling Hardware Profile Change Events

4.6 Using PnP Custom Notification

Chapter 5 Supporting Multifunction Devices

5.1 Supporting Multifunction PC Card Devices

5.1.1 Supporting PC Cards That Conform to the Multifunction Standard

5.1.2 Supporting PC Cards That Have Incomplete Configuration Register Addresses

5.1.3 Supporting PC Cards That Have Incomplete Configuration Registers

5.2 Supporting Multifunction PCI Devices

5.3 Supporting Multifunction Devices On Other Buses

5.4 Using the System-Supplied mf.sys

5.5 Creating Resource Maps for a Multifunction Device

Part 3 Power Management

Chapter 1 Supporting Power Management in Drivers

1.1 Kernel-Mode Power Management Components

1.1.1 ACPI BIOS

1.1.2 ACPI Driver

1.1.3 Power Manager

1.1.4 Driver Role in Power Management

1.2 Power Management Responsibilities for Drivers

1.2.1 Reporting Device Power Capabilities

1.2.2 Setting Device Object Flags for Power Management

1.2.3 Handling Power IRPs

1.2.4 Powering Up a Device

1.2.5 Powering Down a Device

1.2.6 Enabling Device Wake-up

1.3 Rules for Handling Power IRPs

1.3.1 Using PoCallDriver

1.3.2 Passing Power IRPs

1.3.3 Queuing I/O Requests While a Device Is Sleeping

1.3.4 Handling Unsupported or Unrecognized Power IRPs

Chapter 2 Managing Power for Individual Devices

2.1 Device Power States

2.1.1 Device Working State Do

2.1.2 Device Sleeping States D1, D2, and D3

2.1.3 Required Support for Device Power States

2.2 Managing Device Power Policy

2.3 Handling IRP_MN_SET_POWER for Device Power States

2.3.1 Handling Device Power-down IRPs

2.3.2 Handling Device Power-up IRPs

2.3.3 IoCompletion Routines for Device Power IRPs

2.4 Handling IRP_MN_QUERY_POWER for Device Power States

2.5 Sending IRP_MN_QUERY_POWER or IRP_MN_SET_POWER for Device Power States

2.6 Detecting an Idle Device

2.6.1 Using Power Manager Routines for Idle Detection

2.6.2 Performing Device-Specific Idle Detection

Chapter 3 Handling System Power State Requests

3.1 System Power States

3.1.1 System Working State S0

3.1.2 System Sleeping States S1, S2, S3, S4

3.1.3 System Shutdown State S5

3.1.4 System Power Actions

3.2 System Power Policy

3.3 Preventing System Power State Changes

3.4 Handling IRP_MN_QUERY_POWER for System Power States

3.4.1 Failing a System Query-Power IRP

3.4.2 Handling a System Query-Power IRP in a Device Power Policy Owner

3.4.3 Handling a System Query-Power IRP in a Bus Driver

3.4.4 Handling a System Query-Power IRP in a Filter Driver

3.5 Handling IRP_MN_SET_POWER for System Power States

3.5.1 Handling a System Set-Power IRP in a Device Power Policy Owner

3.5.2 Handling a System Set-Power IRP in a Bus Driver

3.5.3 Handling a System Set-Power IRP in a Filter Driver

Chapter 4 Supporting Devices that Have Wake-up Capabilities

4.1 Overview of Wait/Wake Operation

4.1.1 Determining Whether a Device Can Wake the System

4.1.2 Understanding the Path of Wait/Wake IRPs through a Device Tree

4.1.3 Overview of Wait/Wake IRP Completion

4.2 Steps in Handling a Wait/Wake IRP

4.2.1 Handling a Wait/Wake IRP in a Function (FDO) or Filter Driver (Filter DO)

4.2.2 Handling a Wait/Wake IRP in a Bus Driver (PDO)

4.2.3 IoCompletion Routines for Wait/Wake IRPs

4.3 Sending a Wait/Wake IRP

4.3.1 Determining When to Send a Wait/Wake IRP

4.3.2 Wait/Wake IRP Requests

4.3.3 Wait/Wake Callback Routines

4.3.4 Canceling a Wait/Wake IRP

4.4 Cancel Routines for Wait/Wake IRPs

Part 4 Setup

Chapter 1 Device InstalIation Overview

1.1 Device Installation Components

1.2 Sample PnP Device Installation

1.3 How Does Setup Select a Driver For a Device?

1.4 System Setup Phases

Chapt6r 2 Providing a Driver For a Device

2.1 Driver Files

2.2 Driver Information in the Registry

2.3 Specifying Driver Load Order

2.4 Installing Filter Drivers

2.5 Installing a Null Driver for a Device

Chapter 3 Creating an INF File

3.1 General Guidelines for INF Files

3.2 Specifying the Source and Target Locations for Device Files

3.3 Creating a Cross-Platform and/or Dual-OS INF File

3.4 Creating International INF Files

3.5 Tightening File-Open Security in a Device INF File

3.6 Accessing INF Files From an Application

3.6.1 Opening and Closing an INF File

3.6.2 Retrieving Information From an INF File

Chapter 4 Writing a Coinstaller

4.1 Coinstaller Overview

4.2 Coinstaller Interface

4.3 Coinstaller Operation

4.3.1 Handling DIF Codes

4.4 Registering a Coinstaller

4.4.1 Registering a Device-Specific Coinstaller

4.4.2 Registering a Class Coinstaller

Chapter 5 Writing a Class Installer

5.1 Class Installer Interface

5.2 Device Installation Functions Summary

5.3 Registering a Class Installer

5.4 Tightening File-Open Security in a Class Installer INF File

Chapter 6 Writing a Custom Device Installation Application

6.1 Installing a Software Utility That Accompanies a Driver

6.2 Custom Installation Application Guidelines

Chapter 7 Providing Device Property Pages

7.1 Required Support for Device Property Pages

7.2 Handling DIF_ADDPROPERTYPAGE_ADVANCED Requests

7.3 Property Page Callback Function

7.4 Handling Windows Messages for ProPerty Pages

Chapter 8 Troubleshooting Device Installation

8.1 Using SetupAPI Logging

8.1.1 Setting SetupAPI Logging Levels

8.1.2 Interpreting a Sample SetupAPI Log File

8.2 Displaying Hidden Devices in Device Manager

Chapter 9 Installing a Device Required to Boot the Machine

Section 3 Kernel-Mode Drivers Design Guide

Part 1 General Kernel Mode

Chapter 1 Windows 2000 and WDM Drivers

1.1 Overview of Widnows 2000 Components

1.2 Kinds of Drivers in Windows 2000

1.3 Windows 2000 and WDM Driver Design Goals

1.3.1 Portability

1.3.2 Configurability

1.3.3 Always Preemptible and Always Interruptible

1.3.4 Multiprocessor-Saft

1.3.5 Object-Based

1.3.6 Packet-Driven I/O with Reusable IRPs

1.3.7 Supporting Asynchronous I/O

Chapter 2 Layered I/O,IRPS,and I/O Objects

2.1 Overview of the Windows 2000 I/O Model

2.2 End-User I/O Requests and Windows 2000 File Objects

2.2.1 Points to Consider about User I/O Requests

2.3 IRPs and Driver-Specific I/O Stack Locations

2.3.1 Points to Consider about Processing IRPs

2.4 Driver Objects and Standard Driver Routines

2.4.1 Object Opacity

2.4.2 Standard Driver Object Entry Points

2.4.3 Other Standard Driver Routines

2.4.4 Points to Consider about Standard Driver Routines

2.5 Device Configurations and Layered Drivers

2.5.1 Sample Device and Driver Configuration

2.5.2 Points to Consider about adding Drivers

2.6 Device Objects and Layered Drivers

2.6.1 Device Objects for Sample Configuration

2.6.2 Points to Consider about Device Objects

Chapter 3 System-Defined Objects and Support for Drivers

3.1 System Components and Layered Kernel-Mode Drivers

3.1.1 Support Routines that Manipulate System-Defined Objects

3.1.2 Storage for System-Defined Objects

3.2 Device Objects and Device Extensions

3.2.1 Defining a Device Extension

3.2.2 Creating a Device Object and Device Extension

3.2.3 Initializing Driver-Specific Device Objects and Device Extensions

3.2.4 Setting Up Access to User Buffers

3.3 Adapter Objects and DMA

3.3.1 Map Registers

3.3.2 Getting an Adapter Object

3.3.3 Splitting Transfer Requests

3.3.4 Using System DMA

3.3.5 Using Busmaster DMA

3.3.6 Performing Scatter/Gather DMA

3.4 Controller Objects

3.4.1 Creating a Controller Object with a Controller Extension

3.4.2 Allocating the Controller Object for I/O Operations

3.5 Interrupt Objects

3.5.1 Getting a System-Assigned Interrupt Vector,DIRQL,and Processor Mask

3.5.2 Registering an ISR

3.6 DPC Objects

3.6.1 Registering and Queuing a DpcForIsr Routine

3.6.2 Registering and Queuing a CustomDpc Routine

3.7 Timer Objects with Associated DPCs

3.7.1 Registering and Enabling an IoTimer Routine

3.7.2 Registering and Queuing a CustomTimerDpc Routine

3.8 Device Queue Objects and Interlocked Queues

3.8.1 Setting up a Device Queue Object and Queuing IRPs

3.8.2 Setting up an Interlocked Queue and Queuing IRPs

3.9 Kernel Dispatcher Objects

3.9.1 Time Objects

3.9.2 Event Objects

3.9.3 Semaphore Objects

3.9.4 Mutex Objects

3.9.5 Treatment of Alerts and APCs by Threads Waiting on Dispatcher Objects

3.10 Callback Objects

3.10.1 Defining a Callback Object

3.10.2 Using a Driver-Defined Callback Object

3.10.3 Using a System-Defined Callback Object

Chapter 4 Basic Driver Structure

4.1 Standard Driver Routines

4.2 Lowest-Level Device Drivers’Staged IRP Processing

4.3 Intermediate Drivers’Staged IRP Processing

4.4 Designing and Developing a Driver

4.4.1 Naming Device Objects and Registering Device Interfaces

4.4.2 Choosing Names for Driver Routines

4.4.3 Starting Design

4.4.4 Starting Development

Chapter 5 DriverEntry and Reinitialize Routines

5.1 DriverEntry Routine Requirements

5.1.1 DriverEntry Routine Syntax and Parameters

5.1.2 Return from DriverEntry

5.2 DriverEntry Routine Functionality

5.2.1 Every DriverEntry Routine’s Responsibilities

5.2.2 DriverEntry’s Optional Responsibilities

5.3 Reinitialize Routine Requirements and Functionality

Chapter 6 Dispatch Routines

6.1 Dispatch Routine Requirements

6.1.1 Commonly Implemented Dispatch Routines

6.1.2 Conditionally Implemented Dispatch Routines

6.2 Basic Dispatch Routine Functionality

6.2.1 When to Check the I/O Stack Location

6.2.2 How to Complete an IRP in a Dispatch Routine

6.2.3 When to Complete an IRP in the Dispatch Routine

6.2.4 How to Pass IRPs with Valid Parameters on from a Dispatch Routine

6.2.5 Allocating IRPs for Lower-Level Drivers

6.2.6 Handling Asynchronous Transfer Requests

6.3 Designing Dispatch Routines

6.3.1 DispatchCreate and DispatchClose Functionality

6.3.2 DispatchCleanup Functionality

6.3.3 DispatchRead or DispatchWrite Functionality

6.3.4 Dispatch(Internal)DeviceControl Functionality

Chapter 7 StartIo and Queue Management Routines

7.1 Queuing IRPs

7.2 StartIo Routine Requirements

7.2.1 StartIo Routines in Device Drivers

7.2.2 StartIo Routine Functionality

7.2.3 Programming the Device for I/O Operations

7.2.4 StartIo Routines in Higher-Level Drivers

7.2.5 Points to Consider in Implementing StartIo

7.3 Requirements for Using Interlocked Queues or Device Queues

7.3.1 Storage Requirements for Driver-Managed Queues

7.3.2 Setting Up Driver-Managed Queues

7.3.3 Queuing IRPs in Driver-Managed Queues

7.3.4 Managing Interiocked Queues with a Driver-Created Thread

7.3.5 Managing Supplemental Device Queues

Chapter 8 Unterrupt Service Routine

8.1 ISR Requirements

8.1.1 ISR Performance

8.1.2 Additional Required Driver Routines

8.1.3 Setting Up an ISR

8.2 Basic ISR Functionality

8.3 ISR Functionality for Overlapped I/O Operations

Chapter 9 DpcForIsr Routine and CustomDpc Routines

9.1 DpcForIsr and CustomDpc Routine Requirements

9.1.1 DpcForIsr versus CustonDpc Routines

9.1.2 Basic DpcForIsr Requirements

9.1.3 Basic CustomDpc Routine Requirements

9.1.4 Additional Required Driver Routines

9.1.5 Setting Up DpcForIsr and CustomDpc Routines

9.2 DpcforIsr and CustomDpc Functionality

9.2.1 Using Buffered I/O and Satisfying Device Control IRPs

9.2.2 Using Direct I/O

9.2.3 Points to Consider in Implementing a DpcForIsr or CustomDpc Routine

Chapter 10 SynchCritSection Routines

10.1 SynchCritSection Routine Requirements

10.1.1 Using a SynchCritSection Routine

10.1.2 Running a SynchCritSection Routine

10.1.3 SynchCritSection Routine Performance Requirements

10.2 SynchCritSection Routine Functionality

10.2.1 Programming the Device for and I/O Operations

10.2.2 Maintaining State About Interrupt-Driven I/O Operations

Chapter 11 AdapterControl and Controllercontrol Routines

11.1 Driver Control Routines

11.1.1 Driver Control Routine Syntax and Parameters

11.1.2 Returns from DriverControl Routines

11.1.3 Designing Drivers with Drivercontrol Routines

11.1.4 Storage Requirements

11.1.5 Setting Up AdapterControl and ControllerControl Routines

11.2 AdapterControl Routine Requirements

11.3 ControllerControl Routine Requirements

Chapter 12 Cancel Routines

12.1 Cancel Routine Requirements

12.2 Handling cancelable IRPs

12.2.1 Handling Cancelable IRPs in Driver Routines That Pass IRPs On

12.2.2 Handling Cancelable IRPs In Driver Routines That Process Requests

12.2.3 Using the System Cancel Spin Lock

12.2.4 Using a Driver-Supplied Spin Lock with Cancel Routines

12.3 Cancel Routine Functionality

12.3.1 Cancel Routines in Drivers with StartIo Routines

12.3.2 Cancel Routines in Drivers without StartIo Routines

12.4 Points to Consider In Handling Cancelable IRPs

Chapter 13 IoCompletion Routines

13.1 Using IoComPletion Routines

13.1.1 Setting UP an IoCompletion Routine

13.1.2 Calling IoSetCompletionRoutine

13.1.3 Allocating IRPs for Lower Drivers

13.2 IoComPletion Routine Required Functionality

Chapter 14 IoTimer and CustomTimerDpc Routines

14.1 Timer Routine Requirements

14.2 IoTimer Routine Functionality

14.2.1 Setting Up an IoTimer Routine

14.2.2 Setting Up Context for an IoTimer Routine

14.2.3 Using an IoTimer Routine

14.3 CustomTimerDpc Routine Functionality

14.3.1 Setting Up a CustomTimerDpc Routine

14.3.2 Setting Up Context for a CustomTimerDpc Routine

14.3.3 Using a CustomTimerDpc Routine

Chapter 15 Unload Routine

15.1 Unload Routine Requirements

15.2 Unload Routine Environment

15.3 Unload Routine Functionality

15.3.1 PnP Drivers’Unload Functionality

15.3.2 Non-Pnp Drivers’Unload Functionality

Chapter 16 Common Driver Design Issues

16.1 Managing Hardware Priorities

16.2 Using Spin Locks

16.2.1 Providing Storage for Spin Locks and Protected Data

16.2.2 Initializing Spin Locks

16.2.3 Calling Support Routines That Use Spin Locks

16.2.4 Releasing Spin Locks Promptly

16.2.5 Preventing Errors or Deadlocks While Using Spin Locks

16.3 Polling a Device

16.3.1 Driver Threads

16.4 Managing Memory Usage

16.4.1 Using System Memory

16.4.2 Using the Kernel Stack

16.4.3 Using Lookaside Lists

16.4.4 Read-Only Memory Protection

16.5 Maintaining Cache Coherency for DMA and PIO

16.5.1 Flushing Cached Data During DMA Operations

16.5.2 Flushing Cached Data During PIO Operations

16.6 Error Logging and NTSTATUS Values

16.6.1 Calling IoAllocateErrorLogEntry

16.6.2 Filling in an Error Log Packet

16.6.3 Setting NTSTATUS Values in Error Log Packets

16.6.4 Calling IoWriteErrorLogEntry

16.6.5 Defining New IO_ERR_XXX

16.6.6 Defining Private NTSTATUS Constants

16.7 Handling Removable Media

16.7.1 Responding to Check-Verify Requests from the File System

16.7.2 Notifying the File System of Possible Media Changes

16.7.3 Checking Flags in the Device Object

16.7.4 Setting up IRPs in Intermediate Drivers

16.8 Making a Device Available to Applications and Drivers

16.8.1 Registering a Device Interface

16.8.2 Enabling and Disabling a Device Inteiface

16.8.3 Using a Device Interface

16.9 Pageable Code and Data

16.9.1 Making Driver Code Pageable

16.9.2 Locking Pageable Code or Data

16.9.3 Paging an Entire Driver

16.10 Common Driver Reliability Issues

16.10.1 Errors in Buffered I/O

16.10.2 Errors in Referencing User-Space Addresses

16.10.3 Errors in Direct I/O

16.10.4 Error in Caller Input and Device State

16.10.5 Errors in Dispatch Routines

16.10.6 Errors in a Multiprocessor Environment

16.10.7 Errors in Handling IRPs

Section 4 Graphics Drivers Design Guide

Part 1 Graphics Drivers

Chapter 1 Graphics System Overview

1.1 Document Conventions

Chapter 2 GDI Support for Graphics Drivers

2.1 GDI from the Driver’s Perspective

2.1.1 GDI as an Application Graphics Language

2.1.2 GDI as a Rendering Engine

2.2 GDI/Driver Division of Labor

2.2.1 GDI Communication with the Driver

2.2.2 PDEV Negotiation

2.2.3 Surface Negotiation

2.3 GDI Support Services

2.3.1 GDI Support for Surfaces

2.3.2 GDI Support for Palettes

2.3.3 GDI Services for Paths

2.3.4 GDI Drawing Services, Other

2.3.5 GDI Font and Text Services

2.3.6 GDI Support Services, Other

2.4 Floating-point Support

2.5 Data Types

Chapter 3 Supporting the DDI

3.1 Graphics Driver Function Support

3.1.1 Required Graphics Driver Functions

3.1.2 Conditionally Required Graphics Driver Functions

3.1.3 Optional Graphics Driver Functions

3.2 Supporting Initialization and Termination Functions

3.2.1 Driver Initialization and Cleanup

3.2.2 PDEV Initialization and Cleanup

3.2.3 Enabling and Disabling the Surface

3.3 Creating Device-Dependent Bitmaps

3.4 Supporting Graphics Output

3.4.1 Drawing Lines and Curves

3.4.2 Drawing and Filling Paths

3.4.3 Copying Bitmaps

3.4.4 Halftoning

3.4.5 Image Color Management

3.5 Supporting DDI Color and Pattern Functions

3.5.1 Managing Palettes

3.5.2 Realizing Brushes

3.6 Supporting DDI Font and Text Functions

3.6.1 Managing and Optimizing Fonts

3.6.2 Drawing Text

Part 2 Display and Video Miniport Drivers

Chapter 1 Introduction to Display

1.1 Display Architecture

1.1.1 Display Driver Responsibilities

1.1.2 Video Miniport Responsibilities

1.2 Types of Graphics Adapters

1.2.1 Frame Buffers

1.2.2 Accelerators

1.2.3 Coprocessors

1.2.4 VGA

1.3 General Design and Implementation Strategies

1.4 Accessing the Graphics Adapter

1.4.1 Communicating IOCTLs to the Video Miniport Driver

1.4.2 Accessing the Frame Buffer and Hardware Registers

1.5 Creating Graphics INF Files

1.5.1 INF GeneralConfigData Section

1.5.2 Display INF File Sections

1.5.3 Monitor INF File Sections

1.6 Compatibility Testing Requirements for Display and Video Miniport Drivers

1.6.1 INF and Installation Requirements

1.6.2 Video Miniport Driver Requirements

1.6.3 Display driver Requirements

1.6.4 Control Panel Requirements

Chapter 2 Display Drivers

2.1 Display Driver DDI Functions

2.1.1 Required Display Driver Functions

2.1.2 Conditionally Required Display driver Functions

2.1.3 Optional Display Driver Functions

2.2 Display Driver Initialization

2.3 Desktop Management

2.3.1 Switching Desktops: Responding to DrvAssertMode

2.3.2 Returning Display Modes: DrvGetModes

2.3.3 Supporting Multiple PDEVs

2.4 Pointer Control

2.4.1 Pointer Drawing

2.4.2 Controlling the Pointer: DrvSetPointerShape

2.4.3 Moving the Pointer: DrvMovePointer

2.5 Managing Display Palettes

2.6 Bitmaps in Display Drivers

2.7 Asynchronous Rendering

2.8 Transparency in Display Drivers

2.9 Special Effects in Display Drivers

2.10 Color Management for Displays

2.10.1 Monitor Profiles

2.11 DirectDraw and GDI

2.12 Tracking Window Changes

2.13 Supporting the DitherOnRealize Flag

2.14 Supporting Banked Frame Buffers

2.15 Unloading Video Hardware

2.16 Multiple-Monitor Support in the Display Driver

2.17 Mirror Drivers

2.17.1 Mirror Driver INF File

2.17.2 Mirror Driver Installation

2.18 Display Driver Testing Tools

2.18.1 NewDisp: Dynamic Reload of a Display Driver

2.18.2 Dynamic Change of Permitted Driver Accelerations

Chapter 3 DirectDraw DDI

3.1 DirectDraw Driver Header Files, Sample Code, and References

3.2 DirectDraw Architectural Overview

3.2.1 About DirectDraw

3.2.2 DirectDraw Drivers

3.2.3 Hardware Emulation Layer

3.3 DirecMw Driver FundaInntals

3.3.1 DirectDraw Surfaces

3.3.2 Display Memory

3.3.3 Memory Configuration Examples

3.3.4 Flipping

3.3.5 Blitting

3.3.6 Drivers That Assume State Information

3.3.7 Turning On a Display Card and Changing Modes on Windows 95/98

3.4 DirectDraw Driver Initialization

3.5 Video Port Extensions to DirectX

3.5.1 Video Port Extensions Background

3.5.2 DirectX VPE Initialization

3.5.3 DirectDraw Interfaces for Kernel-Mode Video Transport Support

3.6 Color Control Initialization

3.7 AGP Support

3.7.1 Flagging Support for Nonlocal Display Memory

3.7.2 Specifying Nonlocal Display Memory Heaps

3.7.3 Notification of Actual Heap Base Addresses

3.7.4 Callback Handling of Nonlocal Display Memory Surfaces

3.7.5 Reordering Textures in Nonlocal Display Memory

3.7.6 Handling DMA-style AGP

3.8 Kernel-Mode Video Transport

3.8.1 VPE and Kernel-Mode Video Transport Architecture

3.8.2 Using the Kernel-Mode Video Transport

3.8.3 DxApi Miniport Functions for Windows 2000

3.9 Extended Surface Alignment

3.9.1 Review of the Older Alignment Method

3.9.2 Using Extended Surface Alignment

3.10 Extended Surface Capabilities

3.10.1 New Surface Capabilities

3.10.2 Exposing the Extended Surface Capabilities

3.10.3 Extended Heap Restrictions

3.10.4 Extended Surface Description Structure

3.11 Compressed Texture Surfaces

3.11.1 Enumerating DXT Formats

3.11.2 Creating the Compressed Texture Surface

3.11.3 Using Compressed Texture Surfaces

3.12 Motion Compensation

3.13 Return Values for DirectDraw and Direct3D

Chapter 4 Direct3D DDI

4.1 Direct3D DDI Header Files, Sample Code, and References

4.2 Cross-Platform Direct3D Driver Development

4.3 Direct3D Driver Callbacks and Functions

4.3.1 Required Direct3D Driver Callbacks and Functions

4.3.2 Operation Code Handling

4.3.3 Returm Codes for Direct3D Driver Callbacks

4.4 Direct3D Driver Initialization

4.5 Direct3D Context Management

4.5.1 Creating a Context

4.5.2 Deleting a Context

4.5.3 Maintaining State Within a Context

4.5.4 Overview of Direct3D Surface Handles

4.5.5 More on Handles and Creating Driver-Side Surface Structures via D3dCreateSurfaceEx

4.5.6 Why Can’t a Driver-Side Structure Simply Be a Pointer to the Surface?

4.5.7 D3dCreateSurfaceEx and Backing Surfaces

4.5.8 Other Points to Consider in D3dCreateSurfaceEx

4.6 Direct3D Texture Management

4.6.1 Multitexturing

4.6.2 Paletted Textures

4.6.3 Texture blitting

4.6.4 Driver-Managed Textures

4.7 Primitive Drawing and State Changes

4.7.1 Command and Vertex Buffers

4.7.2 Direct3D Command Buffers

4.7.3 Direct3D Vertex Buffers

4.7.4 Accelerated State Management

4.8 Flexible Vertex Format(FVF)

4.8.1 Determining the Vertex Buffer Data Format

4.9 Advanced Direct3D Driver Topics

4.9.1 Optimized textures

4.9.2 Stencil Planes

4.9.3 Guard Band Clipping

4.9.4 Extents Adjustment

4.9.5 W-Buffering

4.9.6 Bump Mapping

4.9.7 Hardware Transform and Lighting

4.10 DirectX 7.0 Release Notes

4.10.1 FVF Update

4.10.2 Rasterizer Update

Chapter 5 Mini Client Driver

5.1 MCD Header Files, Sample Code, and References

5.2 MCD Architecture

5.3 The MCD Interface

5.3.1 Required MCD Functions

5.3.2 Conditionally Required MCD Functions

5.3.3 Optional MCD Functions

5.4 MCD Initialization

5.4.1 Hdev Handle

5.4.2 Pixel Formats

5.5 Rendering Contexts

5.5.1 Context Creation

5.5.2 Context Binding

5.5.3 Context Deletion

5.5.4 State

5.5.5 Viewports

5.6 Memory Management

5.6.1 DMA Support

5.7 Framebuffer Management

5.7.1 allocating Draw Buffers

5.7.2 Querying Draw Buffers

5.7.3 Swapping Draw Buffers

5.7.4 Window Tracking in MCD

5.8 Drawing Operations

5.8.1 Drawing OpenGL Primitives

5.8.2 Drawing Spans

5.8.3 Clearing Buffers

5.8.4 Synchronization

5.9 Texture Mapping

5.9.1 Texture Environment State

5.9.2 Texture State

5.10 Pixel Operations

5.10.1 Pixel State

5.11 Layer Planes

5.11.1 Describing the Layer Planes

5.11.2 Swapping Layer Planes

5.11.3 Managing the Layer Palette

Chapter 6 Video Miniport Drivers

6.1 Video Miniport Header Files, Sample Code, and References

6.2 Video Miniport Driver Within the Graphics Architecture

6.2.1 Platform-Specific Details for Video Miniport

6.3 Video Miniport Driver Interface

6.3.1 Required Video Miniport Driver Functions

6.3.2 Conditionally Required Video Miniport Driver Functions

6.3.3 Optional Video Miniport Driver Functions

6.4 Video Miniport Initialization

6.4.1 Starting the Device of the Video Miniport

6.4.2 Claiming Legacy Resources

6.4.3 Initializing the Video Miniport for Communication with the Display Driver

6.5 Video Miniport’s Device Extension

6.6 Registry Callbacks in the Video Miniport

6.7 Processing Video Requests

6.7.1 System-Defined IOCTL_VIDEO_XXX Requests

6.7.2 Privately Defined Display-Miniport IOCTL_VIDEO_XXX Requests

6.7.3 Handling Unsupported IOCTL_VIDEO_XXX Requests

6.8 Supporting PnP and Power Management in a Video Miniport

6.9 Using AGP in the Video Miniport

6.9.1 Accessing System Memory through AGP

6.9.2 Releasing Memory from AGP Use

6.10 Child Devices of the Graphics Adapter

6.10.1 Detecting Child Devices

6.10.2 Communicating with the Driver of a Child Device

6.11 Interupts in the Video Miniport

6.11.1 When to Implement a Hw VidSynchronizeExecutionCallback Routine

6.12 Timers in the Video Miniport

6.13 Resetting the Adapter in the Video Miniport

6.14 Mirror driver Support in the Miniport

6.15 TV Connector and Copy Protection Support in the Video Miniport

6.15.1 Querying TV Connector and Copy Protection Hardware

6.15.2 Setting TV Connector and Copy Protection Hardware

6.16 VGA-Compatible Miniport’s SvgaHwIoPortXxx

6.16.1 Windowed VDMs in x86-Based Machines

6.16.2 Full-Screen VDMs in x86-based Machines

6.16.3 VGA-Compatible Miniport’s HwFindAdapter

6.16.4 Validating Instructions in SvgaHwIoPortXxx

6.16.5 VGA-Compatible Miniport’s HwVidStartIO

6.17 Converting a Windows NT 4.0 Miniport Driver to Windows 2000

Part 3 Printer Drivers and Spooler Components

Chapter 1 Introduction to Printing

Chapter 2 Print Spooler Atchitecture

2.1 Spooler Components

2.1.1 Introduction to Spooler Components

2.1.2 Print Providers

Chapter 3 Printer Driver Architecture

3.1 Printer Driver Components

3.1.1 Printer Graphics DLL

3.1.2 Printer Interface DLL

3.1.3 Printer Data Files

Chapter 4 Microsoft Universal Printer Driver

4.1 Introduction to the Universal Printer Driver

4.1.1 Unidrv Capabilities

4.1.2 Unidrv Components

4.1.3 Unidrv Minidrivers

4.1.4 Unidrv User Interface

4.1.5 Unidrv Renderer

4.1.6 Sample GPD Files

4.1.7 Microsoft Minidriver Development Tool

4.2 Introduchon to GPD Files

4.2.1 GPD File Entries

4.2.2 Master Units

4.2.3 Using Multiple GPD Files in a Minidriver

4.2.4 Using Resource DLLs in a Minidriver

4.3 Printer Attributes

4.3.1 Printer Attribute Format

4.3.2 Attribute Types

4.3.3 General Attributes

4.4 Printer Commands

4.4.1 Command Entry Format

4.4.2 Command Names

4.4.3 Command Attributes

4.4.4 Command String Format

4.4.5 Command Execution Order

4.5 Printer Features

4.5.1 Standard Features

4.5.2 Customized Features

4.5.3 Feature Entry Format

4.5.4 Feature Attributes

4.5.5 Feature Conflict Priority

4.6 Printer Options

4.6.1 Standard Options

4.6.2 Customized Options

4.6.3 Option Entry Format

4.6.4 Option Attributes

4.6.5 Option Constraints

4.7 Printer Font Descriptions

4.7.1 Hardware-Resident Fonts

4.7.2 Font Cartridges

4.7.3 Font Substitution

4.8 Conditional Statements

4.9 Compressing Raster Data

4.9.1 Using Unidrv-Supported Compression

4.9.2 Using Customized Compression

4.10 Filtering Raster Data

4.11 Handling color Formats

4.12 Handling with Unidrv

4.12.1 GDI-Supplied Halftoning

4.12.2 Minidriver-Supplied Halftoning

4.12.3 Device-Supplied Halftoning

4.13 Controlling Image Quality

4.14 Handling Installable Features and Options

4.15 Specifying Feature and Option Display Order

4.16 Describing Printer Memory Configurations

4.17 Specifying Paper Sizes

4.17.1 Supporting Standard Paper Sizes

4.17.2 Supporting Vendor-Defined Paper Sizes

4.17.3 Supporting User-Defined Paper Sizes

4.18 Referencing Locales

4.19 Installing a Unidrv Minidriver

Chapter 5 Microsoft PostScript Printer Driver

5.1 Pscript Capabilities

5.2 Pscript Components

5.3 Pscript Minidrivers

5.3.1 Converting AFM Files to NTF Files

5.3.2 Installing a Pscript Minidriver

5.4 Pscript User Interface

5.5 Pscript Renderer

Chapter 6 Microsoft Plotter Driver

6.1 Plotter Driver Capabilities

6.2 Plotter Driver Components

6.3 Sample Plotter Driver Files

6.4 Plotter Driver Minidrivers

6.4.1 PCD Source File Format

6.5 Plotter Driver User Interface

6.6 Plotter Driver Renderer

Chapter 7 Customizing Microsoft’s Printer Drivers

7.1 User Interface Plug-Ins

7.1.1 Introduction to User Interface Plug-Ins

7.1.2 Sample UI Plug-In

7.1.3 COM Interfaces for UI Plug-Ins

7.1.4 Providing DEVMODE Structure Additions

7.1.5 Accessing Driver Settings from UI Plug-Ins

7.1.6 Modifying a Driver-Supplied Property Sheet Page

7.1.7 Adding New Property Sheet Pages

7.1.8 Customizing Other Printer Interface Operations

7.2 Rendering Plug-Ins

7.2.1 Introduction to Rendering Plug-Ins

7.2.2 Sample Rendering Plug-In

7.2.3 COM Interfaces for Rendering Plug-Ins

7.2.4 Customized DDI Functions

7.2.5 Customized PDEV Structures

7.2.6 Accessing Driver Settings from Rendering Plug-Ins

7.2.7 Pscript-Specific Customized Rendering

7.2.8 Unidrv-Specific Customized Rendering

7.3 Implementing Printer Driver COM Interfaces

7.3.1 Interface Identifiers for Printer Drivers

7.3.2 Creating the Plug-In

7.3.3 Accessing Plug-In Interfaces from Printer Drivers

7.3.4 Accessing Printer Driver Interfaces from Plug-Ins

7.4 Installing Customized Driver Components

7.4.1 Customized Font Installers for Unidrv

Chapter 8 Customizing Print Spooler Components

8.1 Writipg a Print Processor

8.1.1 Introduction to Print Processors

8.1.2 Sample Print Processor

8.1.3 Functions Defined by Print Processors

8.1.4 Processing a Print Job

8.1.5 Installing a Print Processor

8.2 Writing a Print Monitor

8.2.1 Language Monitors

8.2.2 Port Monitors

8.2.3 Language and Port Monitor Interaction

8.2.4 Functions Defined by Print Monitors

8.2.5 Initializing a Print Monitor

8.2.6 Opening and Closing a Port

8.2.7 Printing a Print Job

8.2.8 Managing a Port

8.2.9 Converting Print Monitors for Use with Clustered Print Servers

8.2.10 Installing a Print Monitor

8.3 Writing a Network Print Provider

8.3.1 Overview of Partial Print Providers

8.3.2 Supporting Printer Change Notifications

8.3.3 Installing a Network Print Provider

Chapter 9 Internet Printing

9.1 Printing to URLs from Applications

9.2 Viewing Print Web Pages

9.3 Customizing Print Web Pages

9.3.1 ASP Files for Print Web Pages

9.3.2 Customizing the Printer Details Web Page

9.3.3 Installing Customized Print Web Pages

9.4 Installing Print Drivers from a Web Page

Chapter 10 Installing and Configuring Printer Drivers

10.1 Plug and Play for Printers

10.2 Printer INF Files

10.2.1 Printer DIRIDs

10.2.2 Printer INF File Entries

10.2.3 Printer INF File Data Sections

10.2.4 Printer INF File Install Sections

10.2.5 Printer INF File CopyFiles Sections

10.2.6 Sample Printer INF Files

10.3 Directory Services for Printers

10.3.1 Print Spooler Support for Printer Directory Services

10.3.2 Printer Driver Support for Printer Directory Services

10.4 Supporting Point and Print

10.4.1 Introduction to Point and Print

10.4.2 Supporting Point and Print During Printer Installations

10.4.3 Supporting Point and Print During Printer Connections

Chapter 11 CPSUI

11.1 Introduction to CPSUI

11.2 Sample CPSUI Application

11.3 CPSUI-Supplied Functions

11.4 Application-Supplied Callback Functions

11.4.1 Page Creation Callbacks

11.4.2 Page Event Callbacks

11.5 Creating Property Sheet Pages

11.5.1 Property Sheet Options

11.5.2 CPSUI-Supported Window Controls

11.5.3 CPSUI-Supplied Pages and Templates

11.5.4 Methods for Specifying Pages

11.5.5 Using CPSUI with Printer Drivers

Chapter 12 Color Management for Printers

12.1 Enabling Color Management

12.2 Controlling Color Management

12.2.1 System Control

12.2.2 Driver Control and Device Control

12.2.3 Supporting CMYK Color Space

12.2.4 Color Management of JPEG and PNG Images

12.3 Locating ICC Profiles

12.4 Installing ICC Profiles

Section 5 Network Drivers Design Guide

Part 1 Network Drivers

Chapter 1 Roadmap to the Network Drivers Design Guide

Chapter 2 Network Architecture for Kernel-Mode Drivers

2.1 Windows 2000 Network Architecture and the OSI Model

2.2 NDIS Drivers

2.2.1 NDIS Miniport Drivers

2.2.2 NDIS Intermediate Drivers

2.2.3 NDIS Protocol Drivers

2.3 TDI Drivers

2.4 Network Driver Environments

2.4.1 Connectionless Environment for Network Drivers

2.4.2 Connection-Oriented Environment for Network Drivers

2.4.3 Environment for WAN Network Drivers

Chapter 3 Network Driver Programming Considerations

3.1 Portability

3.2 Multiprocessor Support

3.3 IRQLs

3.4 Synchronization and Notification

3.5 Packet Structure

3.6 Using Shared Memory

3.7 Asynchronous I/O and Completion Functions

Part 2 Miniport NIC Drivers

Chapter 1 NDIS NIC Miniport Drivers

1.1 Types of NIC Miniports

1.2 Network Interface Card support

1.3 Important Features of Miniport Driver Code

1.3.1 MiniportXxx Functions

1.3.2 Linking to the NDIS Library

1.3.3 Miniport Adapter Context

1.3.4 VC Context

1.3.5 Network OIDs

1.4 Sample Drivers

Chapter 2 Overview of NIC Miniport Operations and Functions

2.1 NIC Miniport Operations

2.1.1 Initializing the NDIS Library and Registering the Miniport Driver

2.1.2 Resistering Network Interface Cards

2.1.3 Responding to Queries and Sets of Miniport Information

2.1.4 Creation,Activating,Deactivating,and Deleting Virtual Connections

2.1.5 Sending Data

2.1.6 Indicating and Transferring Received Data

2.1.7 Indicating Status

2.1.8 Resetting a Network Interface Card

2.1.9 Halting a Miniport NIC Driver

2.2 Miniport Upper-Edge Functions

2.2.1 Upper-Edge Functions of Connectionless Miniports

2.2.2 Upper-Edge Functions of Connection-Oriented Miniports

2.3 NDIS Functions Called by Miniports

2.3.1 NDIS-Supplied Initialization and Registration Functions

2.3.2 NDIS-Supplied Hardware Configuration Functions

2.3.3 NDIS-Supplied I/O Port Functions

2.3.4 NDIS-Supplied DMA-Related Functions

2.3.5 NDIS-Supplied Interrupt Handling Functions

2.3.6 NDIS-Supplied Synchronization Functions

2.3.7 NDIS-Supplied Status Functions

2.3.8 NDIS-Supplied Send and Receive Functions for Connectionless Miniports

2.3.9 NDIS-Supplied Send and Receive Functions for Connection-Oriented Miniports

2.3.10 NDIS-Supplied Out-of-Band Data Macros

2.3.11 NDIS-Supplied Packet and Buffer Handling Functions

2.3.12 NDIS-Supplied Support Functions

2.3.13 NDIS-Supplied Media-Specific Macros

Chapter 3 NIC Miniport DriverEntry and Initialization

3.1 NDIS Miniport DriverEntry Function

3.1.1 Initializing the Wrapper

3.1.2 Registering the Miniport

3.2 NDIS Miniport Initialization

3.2.1 Registering a NIC

3.2.2 Claiming Resources

3.2.3 Registering An Interrupt

3.2.4 Registering a Shutdown Function

3.2.5 Initializing Polling Timers

3.2.6 Synchronization During Initialization

3.2.7 Handling Errors During Initialization

3.3 Querying Miniport Information

3.4 Minimizing Miniport Initialization Time

Chapter 4 Transferring Data

4.1 Handling an Interrupt

4.2 DPC Handler

4.3 Packet Out-Of-Band Data

4.3.1 OOB Data on a Send

4.3.2 OOB Data on a Receive

4.4 Sending Packets

4.4.1 Multipacket Sends from Connectionless Miniports

4.4.2 Single-Packet Sends from Connectionless Miniports

4.4.3 Multipacket Sends from Connection-Oriented Miniports

4.4.4 Synchronizing Memory Before Sending Data

4.4.5 Steps in Sending

4.5 Deserialized Miniports

4.5.1 NDIS Requirements for Deserialized Miniports

4.5.2 Driver-Internal Requirements for Deserialized Miniports

4.6 Receiving Data

4.6.1 Multipacket Receives from Connectionless and Connection-Oriented Miniports

4.6.2 Single-Packet Receives from Connectionless Miniports

4.6.3 Cache Considerations for Receiving Data

4.6.4 Steps in Receiving Data

4.7 Keeping Statistics

4.8 802.1P Packet Priority

4.8.1 Query for 802.1p Priority Support

4.8.2 Packet Support for 802.1p Priority

4.8.3 Specify Packet Size for Sends and Receives

4.8.4 Disable 802.1p Priority Support by Default

Chapter 5 Obtaining and Setting Miniport Information and NDIS Support for WMI

5.1 NDIS Management Information and OIDs

5.2 Querying Miniport Information

5.2.1 Querying a Connectionless Miniport

5.2.2 Querying a Connection-Oriented Miniport

5.3 Setting Miniport Information

5.3.1 Setting Information for a Connectionless Miniport

5.3.2 Setting Information for a Connection-Oriented Mipiport

5.3.3 Occasions for Setting Miniport Information

5.4 Reporting Hardware Status

5.5 NDIS Support for WMI

5.5.1 Registration and Deregistration of NDIS Miniports with WMI

5.5.2 Mapping of GUIDs to OIDs and Miniport Status

5.5.3 Support for Named VCs

5.5.4 NDIS-Supported WMI Operations

5.5.5 Standard Miniport OIDs Registered with WMI

5.5.6 Standard Miniport Status Registered with WMI

5.5.7 Customized OIDs and Status Indications

Chapter 6 Power Management for Miniports

6.1 Required and Optional OIDs for Power Management

6.2 Network Device Power States

6.3 Network Wake-Up Events

6.3.1 Link-Change Wake-Up

6.3.2 Network Wake-Up Frames

6.3.3 Magic-Packet Wake-Up

6.3.4 Enabling Wake-Up Events

6.3.5 Handling a Wake-Up Event

6.4 Handling an OID_PNP_QUERY_POWER

6.5 Handling an OID_PNP_SET_POWER

6.5.1 Transitioning to a Sleeping State

6.5.2 Transitioning to a Working State

6.6 Power-Management for Legacy Miniports

Chapter 7 Reset,Halt,and Shutdown

7.1 Hardware Reset

7.2 Halt Handler

7.3 Shutdown Handler

Chapter 8 WAN Miniport NIC Drivers

8.1 RAS Architecture

8.2 NDISWAN Overview

8.3 Network Cards, Bindings, and Connections

8.4 Implementing WAN Miniport Drivers

8.4.1 Differences Between Standard WAN and LAN Miniport Drivers

8.4.2 Additional Features of CoNDIS WAN Miniport Drivers

8.4.3 WAN Miniport Driver Services

8.4.4 WAN Miniport Driver Indications

8.5 WAN Packet Framing

8.5.1 Asynchronous Framing

8.5.2 X.25 Framing

8.5.3 ISDN and Switched 56K Framing

8.6 Extensions to Support Teleptionic Services Over Standard NDIS

8.6.1 NDISTAPI Overview

8.6.2 Line Devices, Addresses, and Calls

8.6.3 Set and Query Requests

8.6.4 Maintaining State Information

8.6.5 Setting Up Handles

8.6.6 TAPI Registration

8.6.7 TAPI Initialization

8.6.8 Line Open

8.6.9 Accepting an Incoming Call

8.6.10 Making a TAPI Call

8.6.11 Unsolicited Event Handling

8.6.12 Line-Up Indication

8.6.13 Call Line Shutdown

8.6.14 NDISTAPI Interface

8.7 Using CoNDIS Extensions that Support Telephonic Services

8.7.1 NDPROXY Overview

8.7.2 CoNDIS TAPI Registration

8.7.3 CoNDIS TAPI Initialization

8.7.4 Making Outgoing Calls

8.7.5 Accepting Incoming Calls

8.7.6 CoNDIS TAPI Shutdown

8.7.7 Call Manager Requirements for Voice Streaming

8.7.8 Non-WAN-Specific Extensions to Support Telephonic Services Over Connection-Oriented NDIS

Chapter 9 Task Offload

9.1 Querying Task-Offload Capabilities

9.1.1 Reporting a INC’s Checksum Capabilities

9.1.2 Reporting a INC’s IP Security Capabilities

9.1.3 Reporting a INC’s TCP-Packet-Segmentation Capabilities

9.2 Enabling Task-Offload Capabilities

9.3 Disabling Task-Offload Capabilities

9.4 Accessing Per-Packet Information

9.5 Offloading TCP/IP Checksum Tasks

9.6 Offloading IP Security Tasks

9.7 Offloading the Segmentation of Large TCP Packets

9.8 Combinations of Offloads

9.9 Using Registry Values To Enable and Disable Task Offloading

Chapter 10 Load Balancing and Fail Over

10.1 About LBFO

10.2 Specifying Support of LBFO

10.3 Implementing LBFO in a Miniport Driver

10.3.1 Initializing a Bundle of Miniports

10.3.2 Balancing a Miniport Driver’s Workload

10.3.3 Promoting a Secondary Miniport After the Primary Miniport Fails

Chapter 11 Fast Forwarding Path

11.1 About FFP

11.1.1 FFP Using One NIC

11.1.2 FFP Using Multiple NICs

11.1.3 IP Forwarding

11.1.4 FFP and Packet Filtering

11.2 FFP Support in NDIS

11.3 Implementing FFP in Miniports for IP Forwarding

Chapter 12 Miniport Driver with a WDM Lower Interface

12.1 Miniport with a WDM Lower Edge

12.2 Registering Miniport Functions for WDM Lower Edge

12.3 Initializing a Miniport with a WDM Lower Edge

12.4 Issuing Commands to Communicate with Remote Devices

12.4.1 Sending Packets on a Bus

12.4.2 Receiving Packets on a Bus

12.5 Implementation Tips for WDM Lower Edge

12.6 Compile Flags for WDM Lower Edge

Chapter 13 IrDA Miniport NIC Drivers

13.1 About IrDA Miniport Drivers

13.2 IrDA Architecture

13.3 IrDA Protocol Driver

13.4 IrDA Medium Features

13.4.1 Communication Link Speeds

13.4.2 Communication Link Turnaround Times

13.4.3 Receiver Synchronization

13.5 IrLAP Frame Format

13.5.1 About IrLAP Frame Format

13.5.2 Use of Frame Information

13.5.3 Address Member

13.6 IrDA Miniport Driver Packet Coding Schemes

13.6.1 SIR Coding

13.6.2 MIR Coding

13.6.3 FIR Coding

13.7 Sending and Receiving Packe Arrays

13.8 Plug and Play

13.8.1 Non-Plug and Play External Serial-Attached SIR Adapters

13.8.2 Non-PnP Internal SIR Adapters or Internal SIR Adapters Incorrectly Exposed as Serial Ports

13.8.3 PnP External Serial-Attached SIR Adapters

13.8.4 PnP Internal SIR Adapters

13.8.5 Non-PnP Bus-Attached FIR Adapters

13.8.6 PnP Bus-Attached FIR Adapters

Part 3 Intermediate NDIS Drivers and TDI Drivers

Chapter 1 NDIS Intermediate Drivers

1.1 Intermediate Driver DriverEntry Function

1.1.1 Registering as an NDIS Intermediate Driver

1.2 Dynamic Binding in an Intermediate Driver

1.2.1 Opening an Adapter Underlying an Intermediate Driver

1.2.2 Initializing as a Miniport

1.2.3 Intermediate Driver Query and Set Operations

1.2.4 Registering an Intermediate Driver as a Connection-Oriented Client

1.3 Intermediate Driver Packet Management

1.4 Restrictions on Intermediate Drivers

1.5 Receiving Data in an Intermediate Drivers

1.5.1 Receiving Data in an Intermediate Driver with a Connectionless Lower Edge

1.5.2 Receiving Data in an Intermediate Driver with a Connection-Oriented Lower Edge

1.5.3 Indicating Receive Packets to Higher Level Drivers

1.6 Transmitting Packets through an Intermediate Driver

1.6.1 Passing Media-Specific Information

1.7 Handling PnP Events and PM Events in an Intermediate Driver

1.7.1 Handling OID_PNP_XXX Queries and Sets

1.7.2 Implementing a ProtocolPnPEvent Handler in an Intermediate Driver

1.7.3 Handling a Set Power Request

1.8 Intermediate Driver Reset Operations

1.9 Intermediate Driver Unbinding Operations

1.10 Status Indications in an Intermediate Driver

Chapter 2 NDIS Protocol Drivers

2.1 Protocol DriverEntry and Initialization

2.1.1 Registering as an NDIS Protocol Driver

2.1.2 Opening an Adapter Underlying a Protocol Driver

2.1.3 Protocol Driver Query and Set Operations

2.1.4 Registering as a Call Manager or a Connection-Oriented Client

2.2 Protocol Driver Packet Management

2.3 Dynamic binding in a Protocol Driver

2.4 Receiving Data in a Protocol Driver

2.4.1 Receiving Data in a Connectionless Protocol Driver

2.4.2 Receiving Data in a connection-Oriented Protocol Driver

2.5 Sending Protocol Driver-Originated Packets

2.5.1 Sending Packets from a Connectionless Protocol Driver

2.5.2 Sending Packets from a connection-Oriented Protocol Driver

2.6 Handling PnP Events and Power Management Events in a Protocol Driver

2.7 Protocol Driver Reset Operations

2.8 Protocol Driver Unbinding Operations

2.9 Status Indications in a Protocol Driver

Chapter 3 TDI Transports and Their Clients

3.1 The Transport Driver Interface(TDI)

3.2 TDI Device Objects

3.3 TDI File Objects

3.3.1 File Objects Represent Transport Addresses

3.3.2 File Objects Represent Connection Endpoints

3.3.3 File Objects Represent Control Channels

3.4 TDI Transport driver Routines

3.5 TDI Kernel-Mode Client Interactions

3.6 TDI Requests versus Events

Chapter 4 TDI Routines,Macros,and Callbacks

4.1 TDI Driver Initialization

4.1.1 Registering a TDI Transport Driver

4.1.2 Unloading and Deregistering a TDI Transport Driver

4.2 TDI Driver Dispatch Routines

4.3 TDI IOCTL Requests

4.4 TDI Client Callbacks

4.5 TDI Library Functions and Macros

Chapter 5 TDI Operations

5.1 Opening a Transport Address

5.2 Opening a Connection Endpoint

5.3 Packaging and Submitting IOCTL Requests

5.4 Setting and Querying Information

5.5 Making an Endpoint-to-Endpoint Connection

5.6 Sending and Receiving Connection-Oriented Data

5.7 Sending and Receiving Connectionless Data

5.8 Connection-Oriented Versus Connectionless Transfers

5.9 Requesting Transport-Specific Actions

5.10 Receiving Error Notifications

5.11 Disconnecting an Endpoint-to-Endpoint Connection

5.12 Closing a Connection Endpoint

5.13 Closing a Transport Address or Control Channel

Chapter 6 Transport Helper DLLs for Windows Sockets

6.1 Windows Sockets Helper DLL Architecture

6.2 Communicating with a WSH DLL

6.3 Configuring a WSH DLL

6.4 WSH DLL Synchronization

6.5 Supporting Connect and Disconnect Data with a WSH DLL

6.5.1 Client Applications and Connect Data

6.5.2 Server Applications and Connect Data

6.5.3 Disconnect Data

6.6 WSH DLL Function Summary

Part 4 Connection-Oriented NDIS

Chapter 1 Connection-Oriented NDIS

1.1 Connection-Oriented Environment

1.2 Using AFs, VCs, SAPs, and Parties

1.2.1 Address families

1.2.2 virtual Connections

1.2.3 SAPs

1.2.4 Parties

1.3 Quality of Service

1.4 How an MCM Differs from a Call Manager

1.4.1 Differences in Initialization

1.4.2 Differences in Calls to NdisXxx Functions

1.4.3 Differences in Virtual Connections

1.5 Connection-Oriented Timing Features

1.6 Connection-Oriented Operations

1.6.1 Summary of connection-Oriented Operations

1.6.2 Operations on address Families and SAPs

1.6.3 Operations on VCs

1.6.4 Setting Up a Call

1.6.5 Changing the QoS of an Active VC

1.6.6 Adding and Dropping Parties

1.6.7 Sending and Receiving Data

1.6.8 Tearing Down a Call

1.6.9 Obtaining and Setting Information

1.6.10 Reset

Part 5 Installing Network Components

Chapter 1 Installing Network Components

1.1 Components and Files Used to Install Network Components

1.2 Creating a Network INF File

1.2.1 Filename Conventions for Network INFs

1.2.2 Version Section for Network INF Files

1.2.3 Models Section for Network INF Files

1.2.4 DDInstall Section for Network INF Files

1.2.5 Remove Section for Network INF Files

1.2.6 ControlFlags Section for Network INF Files

1.2.7 Add-registry-Section for Network INF Files

1.2.8 DDInstall Services Section

1.2.9 NetworkProvider and PrintProvider Sections

1.2.10 Winsock Sections

1.2.11 Summary of Installation Requirements for Network Components

Chapter 12 Notify Objects for Network components

2.1 About the Notify Object

2.1.1 Notify Object diagram

2.1.2 Types of Notifications

2.1.3 Installation of the Network Component

2.1.4 removal of the Network Component

2.1.5 Upgrade to the Network Component

2.1.6 Displaying and Changing Properties

2.1.7 configuration of the Network

2.2 Creating the Notify Object

2.2.1 Loading the Notify Object DLL and Class Object

2.2.2 defining a Notify Class

2.2.3 Creating and Initializing an Instance of a Notify Object

2.2.4 Installing,Upgrading,and Removing the Component

2.2.5 Creating Property Pages for the component

2.2.6 Setting Context to Display Properties

2.2.7 Evaluating changes to Network Configuration

2.2.8 Applying Component Changes to the Registry

2.2.9 Configuring the Component’s Driver