Muutke küpsiste eelistusi

E-raamat: Writing Windows VxDs and Device Drivers 2nd edition [Taylor & Francis e-raamat]

  • Formaat: 494 pages
  • Ilmumisaeg: 12-Jan-1996
  • Kirjastus: CMP Books
  • ISBN-13: 9780429081071
  • Taylor & Francis e-raamat
  • Hind: 281,59 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Tavahind: 402,26 €
  • Säästad 30%
  • Formaat: 494 pages
  • Ilmumisaeg: 12-Jan-1996
  • Kirjastus: CMP Books
  • ISBN-13: 9780429081071
Software developer and author Karen Hazzah expands her original treatise on device drivers in the second edition of Writing Windows VxDs and Device Drivers. The book and companion disk include the author's library of wrapper functions that allow the progr

Find out why MSDN has called this book 'the only really systematic and thorough introduction to VxD writing.' For this second edition, Karen Hazzah has included expanded coverage of Windows 95.

Software developer and author Karen Hazzah expands her original treatise on device drivers in the second edition of Writing Windows VxDs and Device Drivers. The book and companion disk include the author's library of wrapper functions that allow the progr

Software developer and author Karen Hazzah expands her original treatise on device drivers in the second edition of Writing Windows VxDs and Device Drivers
Preface iii
A Step-by-step Approach iv(1)
Which Version of Windows? iv(1)
About the Book iv
Chapter 1 Indtroduction
1(6)
What is a Driver?
1(1)
Privileged and Non-Privileged Packages
1(1)
Driver Interfaces
2(1)
What Kind of a Driver Do I Need to Write?
2(1)
What Class of Device?
2(2)
What Kind of Hardware Interface?
4(1)
What are the Performance Requirements?
5(1)
Summary
5(2)
Part 1 Windows Execution Environment and VxDs 7(280)
Chapter 2 The Virtual World of Windows
9(10)
What is a Virtual Machine?
10(1)
Multitasking Model
11(1)
Virtual Memory through Demand Paging
11(1)
Processor Modes
12(1)
Protected Mode
13(1)
V86 Mode
14(1)
Windows Execution Environments
15(2)
Summary
17(2)
Chapter 3 How Windows Implements the Virtual Environments
19(18)
Trapping I/O Port Access
19(3)
Trapping Access to Memory-mapped Devices
22(1)
Trapping Interrupts and Exceptions
22(1)
Processor Registers
23(1)
A Closer Look at Linear Addresses and Paging
23(3)
Competing Address Requirements of Win32, Win16, and DOS Applications
26(1)
Win32 Address Requirements
26(1)
Win16 Address Requirements
26(2)
DOS Address Requirements
28(1)
Satisfying Address Requirements of Win16 and DOS Applications: How Does Windows 3.x Do It?
28(4)
Satisfying Address Requirements of Win32, Win16, and DOS Applications: How Does Windows 95 Do It?
32(4)
Summary
36(1)
Chapter 4 Introduction to VxDs
37(18)
VxD Loading
38(1)
Basic Structure of a VxD
39(1)
The Device Descriptor Block
40(2)
Supporting Data Structures
42(5)
Event Notification
47(2)
Statically Loaded VxD Initialization and Termination Messages
49(1)
Dynamically Loaded VxD Initialization and Termination Messages
50(1)
VM State Change Messages
51(2)
Thread Messages
53(1)
Windows 3.x Differences
54(1)
Summary
54(1)
Chapter 5 A Skeleton VxD
55(24)
Tools for Building VxDs
55(2)
"DDK" Version Source Files
57(3)
The DDB and Device Control Procedure: SKELCTRL. ASM
60(3)
VToolsD Version
63(4)
A Windows 3.x Version of SKELETON
67(1)
Summary
68(11)
Chapter 6 VxD Talks to Hardware
79(28)
I/O-mapped versus Memory-mapped
79(1)
Talking to an I/O-mapped Device
80(1)
Talking to a Memory-mapped Device
81(1)
Statically Configured Memory-mapped Devices
82(1)
Dynamically Configurable Devices
82(3)
Another Data Transfer Method: DMA
85(1)
Using System DMA
86(1)
System DMA Buffer Requirements
86(2)
A Function for Allocating a System DMA Buffer
88(2)
Overview of VDMAD Services
90(1)
VDMAD Services in Detail
91(2)
Using Bus-master DMA
93(3)
The Right Way to Use VDMAD_Scatter_Lock
96(3)
Using Events With Bus-master DMA Transfers
99(1)
Windows 3.x Differences
100(1)
Summary
100(7)
Chapter 7 Handling Hardware Interrupts in a VxD
107(20)
Interrupts and the VMM
108(1)
Using VPICD Services
109(1)
Examining VPICD Services in Detail: VXDRO C
110(2)
Assembly Thunks and C Handlers
112(1)
The HwIntProc Callback: DDBISR. ASM and VXDISR. C
112(1)
Event Handling in VXDISR
113(1)
Windows 3.x Differences
114(2)
Summary
116(11)
Chapter 8 VxDs for Virtualization
127(44)
VMM and Processor Exception
128(1)
Device Ownership
129(1)
Virtualizing an I/O-mapped Device: The PORTTRAP Example
130(1)
The Intialization Routine: OnDevicenInit
130(1)
Handling Different IO Types: Port TrapHandler
131(2)
Checking Ownership: PortTrapThunk
133(3)
Processing VM_ TERMINATE
136(1)
Using PORTTRAP
136(1)
Virtualizing a Memory-mapped Device
137(1)
The Initialization Routine
137(3)
The Fault Handler Routine
140(2)
Processing VM_ Terminate
142(1)
Using PAGETRAP
142(1)
Virtualizing a Hardware Interrupt
143(1)
Which VM?
143(1)
A VxD for Hardware Interrupt Reflection
144(2)
Callbacks: MaskChangeHandler
146(2)
Callbacks: HwIntHandler
148(1)
Callbacks: EOIHandler
149(1)
Callbacks: VirtInHandler and IRETHandler
150(1)
Summary
150(21)
Chapter 9 Plug and Play: The Big Picture
171(12)
Plug and Play Components
172(2)
Plug and Play Cpmponents During Windows 95 Installation
174(2)
Plug and Play Components During Device Installation
176(1)
Plug and Play Components During Boot
176(5)
Summary
181(2)
Chapter 10 Plug and Play Device Driver VxDs
183(32)
Plug and Play VxD Installation
183(1)
Introducing the INF File
184(3)
Plug and Play Boot Process
187(5)
Other Plug and Play Configuration Scenarios
192(1)
Shutdown
192(2)
New Configuration
194(1)
Device Removal
194(1)
A Sample Plug and Play Driver VxD: TRICORD.VxD
195(1)
TRICORD. INF Details
196(1)
Code Details
197(6)
Summary
203(12)
Chapter 11 Communication from Applications to VxDs
215(30)
Win 16 Application to VxD: View from VxD Side
216(1)
Win 16 Application to VxD: View form Application Side
217(2)
Win 16 Application to VxD: Example Code
219(5)
Win 32 Application to VxD: View from VxD side
224(2)
Win32 Application to VxD: View from the Application Side
226(3)
Win32 Application to VxD: Example Code
229(3)
Summary
232(13)
Chapter 12 Communication from VxDs to Applications
245(42)
Difficulties with Calling from a VxD to a Win 16 Application
246(1)
VxD to Win 16 Application Under Windows 3.x
247(3)
Using Nested Execution Services
250(3)
VxD to Win 16 Application under Windows 95: PostMessage
253(1)
VxD to Win 16 Application: Appy Time
254(2)
Windows 95 VxD to Win32 Application: Asynchronous Procedure Calls
256(1)
The APCVXD Example
256(4)
Windows 95 VxD to Win32 Application: Win32 Events
260(2)
VxDs and Win32 Events
262(4)
Summary
268(19)
Part 2 DLL-based Drivers 287(134)
Chapter 13 Introduction to 16-bit Driver DLLs
289(14)
Why Driver DLLs are Always 16-bit
289(1)
Interfacing 16-bit DLL to 32-Bit Application Requires a Thunk
290(1)
Static versus Dynamic Libraries
290(1)
Why Package Drivers in a DLL?
291(1)
Applications versus DLLs
291(1)
DLLs and Stack Segments
292(1)
DLLs and Data Segments
293(1)
DLLs and Ownership of Dynamically Allocated Memory
293(1)
DLL Initialization and Termination
294(1)
DLL Function Requirements
295(1)
The Skeleton Driver
295(1)
Building the Skeleton Driver
296(1)
DLL Requires an Application
297(2)
Debugging Tools for Driver DLLs
299(1)
Summary
299(4)
Chapter 14 Driver DLLs: Connecting to the Hardware
303(22)
DLLs and Port-access
303(1)
A Port-mapped Example
304(2)
Driver Design Conventions
306(1)
The Polled-mode Driver
307(3)
Accessing Memory-mapped Devices
310(1)
A Memory-mapped Version
311(1)
Advanced Memory Issues
312(5)
Summary
317(8)
Chapter 15 Driver DLL: Interrupt Handling
325(36)
Windows Memory Management Strategy Overview
326(6)
Memory Requirements for an Interrupt-safe Driver
332(2)
Static Interrupt-safe Code and Data: The Easy Way
334(1)
Use the Right Way under Windows 3.x
334(1)
Dynamically Allocating Interrupt-safe Buffers: The Easy Way
335(1)
Dynamically Allocating Interrupt-safe Buffers: The Right Way
336(3)
Installing an Interrupt Handler
339(1)
The New Driver: An Overview
340(1)
The New Driver: The Code
341(5)
Summary
346(15)
Chapter 16 Driver DLLs: Using DMA
361(6)
DMA Buffer Requirements
361(1)
How to Allocate a DMA Buffer
362(1)
DMA DOS Applications Under Windows
362(1)
DMA Windows Applications Can Use this Knowledge
363(1)
Using Virtual DMA Services Is Better
363(3)
Summary
366(1)
Chapter 17 Driver DLLs: Using Real Mode Services
367(26)
Talking to DOS Device Driver
368(2)
Special Handling for IOCTLs
370(2)
Talking to TSRs
372(12)
Summary
384(9)
Chapter 18 Thunks: Calling from 32-bit to 16-bit
393(22)
What is a Flat Thunk?
394(2)
Thunk Layer Tasks
396(1)
Thunk Layer Magic
397(2)
Creating a Thunk Layer, Step by Step
399(4)
Building the Thunk Layer, Step by Step
403(1)
Summary
404(11)
Chapter 19 Driver DLLs: Using Timers
415(6)
Timers for Periodic Notification
415(1)
Using SetTimer
416(1)
Hooking INT ICh and INT 8h
416(1)
Don't Depend on 18.2 Ticks per Second
417(1)
Using timeSetEvent : Pros and Cons
417(1)
If All Else Fails ... Use a VxD
418(1)
Measuring Elapsed Time
419(1)
Choices: GetTickCount, timeGetTime, and QueryPerformanceCounter
419(1)
Summary
419(2)
Appendix A Intel Architecture 421(12)
8086/8088 and Real Mode 421(1)
80286 and Protected Mode 422(1)
Selectors and Descriptors 423(2)
Interrupts and Exceptions 425(1)
Protection Mechanisms 426(1)
Privilege Levels 427(1)
80386 and Virtual-8086 Mode 428(3)
Virtual-8086 Mode 431(2)
Appendix B Using Assembly Language With Your VxD Written in C 433(32)
Declaring the DDB 434(1)
Coding the Device Control Procedure 434(3)
Adding "Thunks" to Support Callbacks from VMM/VxDs 437(1)
Introducing the Wrapper Library 438(2)
WRAPPERS. H 440(1)
Overview of WRAPPERS. ASM 441(5)
Building the Wrapper Library 446(1)
Summary 447(18)
Index 465


Karen Hazzah is a professional software developer. Her experience includes developing device drivers for DOS, Windows, and OS/2, using both C and assembly language. She has also published articles on this and other subjects in such journals as Windows Developer's Journal and Windows Tech Journal.