阅读:2354回复:7
Writing Bus Drivers for Windows 2000
Writing Bus Drivers for Windows 2000
OSR Open Systems Resources, Inc. Note: It is assumed that the reader has some familiarity with Windows 2000, PNP, the concept of Functional Device Objects (FDOs) and Physical Device Objects (PDOs), and of “.INF” files This article is the first in a series of articles on how to write a driver for Windows 2000 that implements the functionality of a bus driver. A bus driver in Windows 2000 is a driver that manages a “bus” and its associated physical devices. Of course, this could be a real, honest to goodness, hardware bus. But what’s really cool about bus drivers is that the “bus” that they manage might not even be any sort of bus, in any conventional sense of the word. Rather, creating a bus driver will allow one driver to easily connect with and control the number of instances of a higher-level driver in the system. Consider the Microsoft Disk Class driver. This driver actually acts as both a Function driver and a bus driver. In its role as a Function driver, it creates a Functional Device Object (FDO) for each disk on the system. It then proceeds to act as a bus driver, creating a Physical Device Object (PDO) for each partition on each disk. So, bus drivers can really be very useful things in Win2K, when you think about them “right”. The bus and its devices can be actual physical hardware or virtual hardware, or some abstract software construct. In each case, the bus driver is responsible for enumerating the bus, handling bus related events (insertions, removals, etc.) and managing power state. Of course, supporting a new hardware bus will require creating a bus driver. One of the significant changes in the Windows 2000 architecture was that the bus management functions were removed from the Hardware Abstraction Layer (HAL) and isolated into the bus drivers. Thus, support for new buses can be added to Win2K without having to change the HAL! For this article, we are going to discuss creating a Virtual Bus driver that supports the mythical Fred Bus. Our Fred Bus is a virtual bus that supports two virtual devices, the Fred Toaster and Fred Oven devices. Figure 1 illustrates our bus. Figure 1 |
|
沙发#
发布于:2002-05-30 20:37
麻烦翻译一下,我英文不太好。
|
|
|
板凳#
发布于:2003-06-12 14:28
为什么不贴原地址
[url] http://www.osr.com/ntinsider/1999/bus_driver/bus_driver.htm[/url] |
|
|
地板#
发布于:2003-06-12 14:52
兄弟,你又为什么不这样贴:
http://www.osr.com/ntinsider_1999.shtml 哈哈,开开玩笑,osr的东西我以前贴过一次,这个再贴一次. |
|
地下室#
发布于:2003-06-12 15:30
通过上面这个链接, 大家可以看到1996到2003 NT INSIDER 所有的免费文章 ,没看过的别错过哦.
|
|
5楼#
发布于:2004-04-28 11:11
现在已经看不到了。。。
|
|
6楼#
发布于:2005-02-19 12:32
那么现在哪里可以看到NTInsider的文章呢 ?
|
|
7楼#
发布于:2005-02-19 13:30
那么现在哪里可以看到NTInsider的文章呢 ? 记得以前把上面所有的文章都保存下来的,可上次被一个同事给格式化了硬盘,再找已经没了,郁闷的要死...... |
|
|