Writing windows wdm device drivers by chris cant + видео обзор

ЧИТАТЬ КНИГУ ОНЛАЙН: Writing Windows WDM Device Drivers

НАСТРОЙКИ.

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

СОДЕРЖАНИЕ.

СОДЕРЖАНИЕ

Writing windows wdm device drivers by chris cant

Writing Windows WDMDevice Drivers

Covers NT 4, Win 98, and Win 2000

First, I suggest that you check the book’s web site at www.phdcc.com/wdmbook/. These pages will list any errata, etc., and include a feedback page. This book was written mainly using Windows 98 and the Beta 2 version of Windows 2000, with some updates for the Beta 3 version. I will try to ensure that I post any necessary updates on the book’s web site.

Although this book and the Microsoft documentation can give you a good start when writing device drivers, it is only when you write one yourself that you really learn about device drivers. Often it is only when you make mistakes that you find out how to write code correctly. I have tried to include some anecdotes of when I have erred and the techniques I have used to track down the problem and sort it out. Trying to explain the example code in detail in this book has helped iron out some wrinkles, so I recommend that you describe your code line by line to someone else.

Read this book if you want to learn how to write device drivers for Windows 98 and Windows 2000. It covers the core Windows Driver Model (WDM) fully and looks at two types of system class driver in detail, for the Universal Serial Bus (USB) and Human Input Devices (HID).

The book also covers Window NT 4 and NT 3.51 drivers. These ‘NT style’ drivers will also run in Windows 2000 and sometimes in Windows 98.

I suggest that you run all the examples and study their source code to get the full benefit. The book software includes some software called DebugPrint that lets you view the trace debug statements produced by the example drivers.

If you use a proprietary device driver toolkit, you should still find this book useful. First, the core WDM chapters give a background to the whole subject and might help explain how your toolkit works. Some features of WDM may not be covered by your toolkit and so will need to be implemented ‘by hand’. More importantly, the class driver chapters give you the information you need to write drivers for various device categories.

Firmware or hardware engineers will also find it useful to read some sections of this book. When you design your external device, a software engineer will need to write a device driver to talk to it. Reading the first chapters of this book should let you speak ‘their language’. Help them by providing clear specifications of your hardware at the appropriate level.

If you are currently a VxD driver writer, then many of the general concepts presented in this book will be familiar. However, you will find that the implementation techniques are quite different.

If you have written drivers for NT 4 and NT 3.51, some of the core WDM chapters will be familiar territory. However, Plug and Play and Power Management are crucial new areas of functionality. Supporting Windows Management Instrumentation (WMI) is desirable. The system class drivers will be new to you as well.

NT drivers should run unchanged in Windows 2000, and can sometimes run in Windows 98. However, you should seriously consider migrating to the Plug and Play if it’s appropriate. Supporting Power Management will help to reduce power on and shutdown delays, making PCs more pleasant to use. The Direct Memory Access (DMA) system is used in a slightly different way by WDM device drivers.

Whenever a new and important piece of terminology is introduced, it is highlighted in italic text. Kernel function names (e.g., IoCompleteRequest) and driver function names (e.g., Wdm1Create) are in bold monospaced text. Code examples are in monospaced text.

Acronyms are spelled out when they are first used. Please refer to the Glossary for a full list.

Globally Unique Identifiers (GUIDs) are long obscure strings used to identify Component Object Model (COM) objects and device interfaces. A full GUID such as

When I refer to ‘Windows’, you can take it that I mean both Windows 98 and Windows 2000. ‘Windows’ does not refer to NT 3.51 and NT 4 unless the text specifically says so. In case it is not obvious, W98 refers to Windows 98 and W2000 refers to Windows 2000. Windows 2000 was originally called NT5.

You will have to endure the coding style that I have used for the book and its example source code. You will find that actual driver code on disk often contains more comments than the main text listings.

Most of the code examples are written using C++ although I do not make great use of C++ features. For example, there are no C++ classes used.

Boolean true and false values arc represented by two different types. Kernel calls must use the BOOLEAN type, which is really an unsigned char, where zero means FALSE and non-zero means TRUE. For any other Boolean values, I use the intrinsic C++ bool type that has false and true values.

The main text often refers to Win32 applications. I have not yet come to grips with the implications of Win64, the 64-bit version of Windows 2000. However, you can assume that whatever calls a Win32 application can make, a Win64 application will also be able to make.

Of more importance, I have not yet found out what happens to device drivers in Win64 systems.

Revised Source Files

Revised source code for the following files are on the Writing Windows WDM Device Drivers web site, www.phdcc.com/wdmbook:

Several people have helped directly and indirectly in making this book. First, thanks to Alec Erskine for drawing the cartoons and Ian Cuthbert for scanning them. Caz, Jenny, and Viv have stoically endured months of me »putering too much’. Berney Williams at R&D provided the initial impetus for the project and gave crucial support as the book was written. My brother John and my friend Robin Sillem have helped considerably with ideas and proofreading. Thanks to Vireo Software, Inc., for the review copies of Driver::Works and Driver::Agent, and for a useful web site.

In this book, I will tell you how to write some types of device driver for Windows. I will primarily describe the Windows Driver Model for Windows 98 and Windows 2000. Additionally, I will cover device drivers that also run in Windows NT 3.51 and NT 4, which I call ‘NT style’ drivers.

A device driver provides a software interface to hardware connected to a computer. It is a trusted part of the operating system. User application programs can access hardware in a well- defined manner, without having to worry about how the hardware must be controlled. For example, a disk driver might hide the fact that data must be written in 512-byte chunks. A driver is a piece of software that becomes part of the operating system kernel when it is loaded. A driver makes one or more devices available to the user mode programmer, each representing a physical or logical piece of hardware. For example, one physical hard disk may be viewed as two logical disks called C: and D:.

In Windows, a driver always makes a device look like a file. A handle to the device can be opened. An application program can then issue read and write requests to the driver, before the device handle is finally closed.

Clearly, there are many pieces of hardware that are essentially alike, because they share a bus or do similar tasks. Microsoft provides several generic drivers that perform these common tasks. Device drivers can use the facilities of these standard drivers. This approach makes it easier to share a common bus, and makes it simpler to write new drivers.

The task of writing a new driver, therefore, often starts by identifying which generic drivers can be used. A stack of drivers, layered one on top of each other, processes user requests in stages. A low-level bus driver might be used to handle all the basic communication with hardware. An intermediate class driver might provide the facilities that are common to a whole category of devices.

In Windows 98 and Windows 2000, device drivers must be designed according to the Windows Driver Model (WDM), which I describe in the following section. WDM is based on the device driver model used in Windows NT 4 and NT 3.51.

The Windows Driver Model

The Windows Driver Model has two separate but equally important aspects. First, the core model describes the standard structure for device drivers. Second, Microsoft provides a series of bus and class drivers for common types of devices.

The core WDM model describes how device drivers are installed and started, and how they should service user requests and interact with hardware. A WDM device driver must fit into the Plug and Play (PnP) system that lets users plug in devices that can be configured in software.

Microsoft provides a series of system drivers that have all the basic functionality needed to service many standard types of device. The first type of system driver supports different types of bus, such as the Universal Serial Bus (USB), IEEE 1394 (FireWire) and Audio port devices. Other class drivers implement standard Windows facilities such as Human Input Devices (HID) and kernel streaming. Finally, the Still Image Architecture (STI) provides a framework for handling still images, scanners, etc.

These system class drivers can make it significantly easier to write some types of device driver. For example, the USB system drivers handle all the low-level communications across this bus. A well defined interface is made available to other drivers. This makes it fairly straightforward to issue requests to the USB bus.

Source and Binary Compatibility

Originally Microsoft stated that WDM drivers would be binary compatible between Windows 98 and Windows 2000 x86, and source code compatible to Windows 2000 Alpha platforms. However, it now seems as though binary compatibility is not assured, even though the DDKs are unclear on the subject.

I have erred on the safe side, only installing drivers that have been built for the right operating system. That is, the Windows 98 Driver Development Kit (DDK) is used when building drivers for Windows 98, and the W2000 DDK for W2000.

Источник

Writing windows wdm device drivers by chris cant

Размер шрифта:
14 | 16 | 18 | 20 | 22 | 24

Цвет текста:
Установить
Цвет фона:
Установить

Chapter 1
Introduction

The Windows Driver Model

A New Frame of Mind

Win32 Program Interface

Chapter 2
The Big Picture

Device Driver Components

Types of Device Driver

Chapter 3
Device Driver Design

Driver Design Guide

Chapter 4
WDM Driver Environment

Driver Language and Libraries

The Wdm1 Driver Code

Managing Devices and Drivers

Chapter 5
Device Interfaces

Device Objects and Device Extensions

Creating and Deleting Device Objects

Win32 Device Interface Access

Chapter 6
Testing and Debugging

Chapter 7
Dispatch Routines

Dispatch Routine IRPs

I/O Request Packets

Common IRP Parameters

Chapter 8
Plug and Play and Device Stacks

Plug and Play Messages

Chapter 9
Plug and Play Implementation

Implementing Plug and Play

Plug and Play Notification

Advanced Plug and Play

Chapter 10
Power Management

System Power Policies

Device Power Policy Owner

Handling Set Power IRPs

Dispatch Routine Power Handling

Testing Wdm2 Power Capabilities

Advanced Power Management

Chapter 11
Installation

WDM Driver Installation Process

INF File Section Hierarchy

Cross-Platform and WDM INF Files

NT Style Driver Installation

Installing NT Style Drivers in Windows 98

Chapter 12
Windows Management Instrumentation

Chapter 13
Event Reporting

Registering as an Event Source

Testing Wdm3 Events

Chapter 14
DebugPrint

Chapter 15
WdmIo and PHDIo Drivers

LPT Printer Driver Application

Analyzing WdmIo and PHDIo

Chapter 16
Hardware I/O IRP Queuing

Cancelling Queued IRPs

Cleanup IRP Handling

Supplemental Device Queues

Chapter 17
Interrupt-Driven I/O

WdmIo Reads and Writes

Deferred Procedure Calls

Chapter 18
NT Hardware

NT Style Driver Construction

Device Creation and Deletion

Chapter 19
WDM System Drivers

Writing Client Drivers

Chapter 20
The Universal Serial Bus

USB Low Level Structure

USB Device Framework

Chapter 21
USB Driver Interface

USB Client Driver Design

USBDI Structure Reference

USBDI URB Reference

Chapter 22
The Human Input Device Model

Источник

Chris Cant: Writing Windows WDM Device Drivers

Здесь есть возможность читать онлайн «Chris Cant: Writing Windows WDM Device Drivers» весь текст электронной книги совершенно бесплатно (целиком полную версию). В некоторых случаях присутствует краткое содержание. Город: Lawrence, Kansas 66046, ISBN: 0-87930-565-7, издательство: R & D Books, категория: Программирование / на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале. Библиотека «Либ Кат» — LibCat.ru создана для любителей полистать хорошую книжку и предлагает широкий выбор жанров:

Выбрав категорию по душе Вы сможете найти действительно стоящие книги и насладиться погружением в мир воображения, прочувствовать переживания героев или узнать для себя что-то новое, совершить внутреннее открытие. Подробная информация для ознакомления по текущему запросу представлена ниже:

Writing windows wdm device drivers by chris cant

Writing Windows WDM Device Drivers: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Writing Windows WDM Device Drivers»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Chris Cant: другие книги автора

Кто написал Writing Windows WDM Device Drivers? Узнайте фамилию, как зовут автора книги и список всех его произведений по сериям.

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Возможность размещать книги на на нашем сайте есть у любого зарегистрированного пользователя. Если Ваша книга была опубликована без Вашего на то согласия, пожалуйста, направьте Вашу жалобу на info@libcat.ru или заполните форму обратной связи.

В течение 24 часов мы закроем доступ к нелегально размещенному контенту.

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing windows wdm device drivers by chris cant

Writing Windows WDM Device Drivers — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система автоматического сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Writing Windows WDM Device Drivers», без необходимости каждый раз заново искать на чём Вы остановились. Не бойтесь закрыть страницу, как только Вы зайдёте на неё снова — увидите то же место, на котором закончили чтение.

Writing Windows WDMDevice Drivers

Covers NT 4, Win 98, and Win 2000

First, I suggest that you check the book’s web site at www.phdcc.com/wdmbook/. These pages will list any errata, etc., and include a feedback page. This book was written mainly using Windows 98 and the Beta 2 version of Windows 2000, with some updates for the Beta 3 version. I will try to ensure that I post any necessary updates on the book’s web site.

Although this book and the Microsoft documentation can give you a good start when writing device drivers, it is only when you write one yourself that you really learn about device drivers. Often it is only when you make mistakes that you find out how to write code correctly. I have tried to include some anecdotes of when I have erred and the techniques I have used to track down the problem and sort it out. Trying to explain the example code in detail in this book has helped iron out some wrinkles, so I recommend that you describe your code line by line to someone else.

Read this book if you want to learn how to write device drivers for Windows 98 and Windows 2000. It covers the core Windows Driver Model (WDM) fully and looks at two types of system class driver in detail, for the Universal Serial Bus (USB) and Human Input Devices (HID).

The book also covers Window NT 4 and NT 3.51 drivers. These «NT style» drivers will also run in Windows 2000 and sometimes in Windows 98.

I suggest that you run all the examples and study their source code to get the full benefit. The book software includes some software called DebugPrint that lets you view the trace debug statements produced by the example drivers.

If you use a proprietary device driver toolkit, you should still find this book useful. First, the core WDM chapters give a background to the whole subject and might help explain how your toolkit works. Some features of WDM may not be covered by your toolkit and so will need to be implemented «by hand». More importantly, the class driver chapters give you the information you need to write drivers for various device categories.

Firmware or hardware engineers will also find it useful to read some sections of this book. When you design your external device, a software engineer will need to write a device driver to talk to it. Reading the first chapters of this book should let you speak «their language». Help them by providing clear specifications of your hardware at the appropriate level.

If you are currently a VxD driver writer, then many of the general concepts presented in this book will be familiar. However, you will find that the implementation techniques are quite different.

If you have written drivers for NT 4 and NT 3.51, some of the core WDM chapters will be familiar territory. However, Plug and Play and Power Management are crucial new areas of functionality. Supporting Windows Management Instrumentation (WMI) is desirable. The system class drivers will be new to you as well.

NT drivers should run unchanged in Windows 2000, and can sometimes run in Windows 98. However, you should seriously consider migrating to the Plug and Play if it’s appropriate. Supporting Power Management will help to reduce power on and shutdown delays, making PCs more pleasant to use. The Direct Memory Access (DMA) system is used in a slightly different way by WDM device drivers.

Whenever a new and important piece of terminology is introduced, it is highlighted in italic text. Kernel function names (e.g., IoCompleteRequest) and driver function names (e.g., Wdm1Create) are in bold monospaced text. Code examples are in monospaced text.

Acronyms are spelled out when they are first used. Please refer to the Glossary for a full list.

Globally Unique Identifiers (GUIDs) are long obscure strings used to identify Component Object Model (COM) objects and device interfaces. A full GUID such as

When I refer to «Windows», you can take it that I mean both Windows 98 and Windows 2000. «Windows» does not refer to NT 3.51 and NT 4 unless the text specifically says so. In case it is not obvious, W98 refers to Windows 98 and W2000 refers to Windows 2000. Windows 2000 was originally called NT5.

You will have to endure the coding style that I have used for the book and its example source code. You will find that actual driver code on disk often contains more comments than the main text listings.

Most of the code examples are written using C++ although I do not make great use of C++ features. For example, there are no C++ classes used.

Boolean true and false values arc represented by two different types. Kernel calls must use the BOOLEAN type, which is really an unsigned char, where zero means FALSE and non-zero means TRUE. For any other Boolean values, I use the intrinsic C++ bool type that has false and true values.

The main text often refers to Win32 applications. I have not yet come to grips with the implications of Win64, the 64-bit version of Windows 2000. However, you can assume that whatever calls a Win32 application can make, a Win64 application will also be able to make.

Of more importance, I have not yet found out what happens to device drivers in Win64 systems.

Revised Source Files

Revised source code for the following files are on the Writing Windows WDM Device Drivers web site, www.phdcc.com/wdmbook:

Several people have helped directly and indirectly in making this book. First, thanks to Alec Erskine for drawing the cartoons and Ian Cuthbert for scanning them. Caz, Jenny, and Viv have stoically endured months of me «‘putering too much». Berney Williams at R&D provided the initial impetus for the project and gave crucial support as the book was written. My brother John and my friend Robin Sillem have helped considerably with ideas and proofreading. Thanks to Vireo Software, Inc., for the review copies of Driver::Works and Driver::Agent, and for a useful web site.

In this book, I will tell you how to write some types of device driver for Windows. I will primarily describe the Windows Driver Model for Windows 98 and Windows 2000. Additionally, I will cover device drivers that also run in Windows NT 3.51 and NT 4, which I call «NT style» drivers.

A device driver provides a software interface to hardware connected to a computer. It is a trusted part of the operating system. User application programs can access hardware in a well-defined manner, without having to worry about how the hardware must be controlled. For example, a disk driver might hide the fact that data must be written in 512-byte chunks. A driver is a piece of software that becomes part of the operating system kernel when it is loaded. A driver makes one or more devices available to the user mode programmer, each representing a physical or logical piece of hardware. For example, one physical hard disk may be viewed as two logical disks called C: and D:.

In Windows, a driver always makes a device look like a file. A handle to the device can be opened. An application program can then issue read and write requests to the driver, before the device handle is finally closed.

Похожие книги на «Writing Windows WDM Device Drivers»

Представляем Вашему вниманию похожие книги на «Writing Windows WDM Device Drivers» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё не прочитанные произведения.

Источник

Видео

Developing Kernel Drivers with Modern C++ - Pavel Yosifovich

Developing Kernel Drivers with Modern C++ - Pavel Yosifovich

01 Windows Device Driver Development using WDF --Introduction

01 Windows Device Driver Development using WDF --Introduction

Set up: Windows Driver Kit (WDK) for Visual Studio 2019

Set up: Windows Driver Kit (WDK) for Visual Studio 2019

Find Windows Drivers for Hardware

Find Windows Drivers for Hardware

Unknown device driver windows 7/8/10

Unknown device driver windows 7/8/10

Windows Kernel Programming Tutorial 3 - Writing a simple driver

Windows Kernel Programming Tutorial 3 - Writing a simple driver

How to Avoid Writing Device Drivers for Embedded Linux - Chris Simmonds, 2net

How to Avoid Writing Device Drivers for Embedded Linux - Chris Simmonds, 2net

17 windows device drivers for developers 2d 16h

17 windows device drivers for developers 2d 16h

Write a Windows kernel driver

Write a Windows kernel driver

02 Windows Device Driver Development using WDF --Windows Driver Fundamentals - Part 1

02 Windows Device Driver Development using WDF --Windows Driver Fundamentals - Part 1
Поделиться или сохранить к себе:
Добавить комментарий

Нажимая на кнопку "Отправить комментарий", я даю согласие на обработку персональных данных, принимаю Политику конфиденциальности и условия Пользовательского соглашения.