Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
windows设备驱动程序中pdo和fdo的区别是什么?_Windows_Windows Kernel - Fatal编程技术网

windows设备驱动程序中pdo和fdo的区别是什么?

windows设备驱动程序中pdo和fdo的区别是什么?,windows,windows-kernel,Windows,Windows Kernel,我正在自己研究windows设备驱动程序,我发现很难区分PDO和FDO。让我告诉你我脑子里的想法,如果我错了,请纠正我 系统引导时,加载将创建FDO的根总线驱动程序。现在它将枚举它的子设备,我猜总线驱动程序的一些热插拔方法将被调用,当找到一个新的子设备时,该方法将通知PNP管理器。PNP manager将调用根总线驱动程序的AddDevice()例程,这将为新总线(如PCI总线等)创建PDO。请详细解释整个流程,这只是我的想象。然后,系统将加载PCI总线的功能驱动程序,该驱动程序将创建FDO??

我正在自己研究windows设备驱动程序,我发现很难区分PDO和FDO。让我告诉你我脑子里的想法,如果我错了,请纠正我

系统引导时,加载将创建FDO的根总线驱动程序。现在它将枚举它的子设备,我猜总线驱动程序的一些热插拔方法将被调用,当找到一个新的子设备时,该方法将通知PNP管理器。PNP manager将调用根总线驱动程序的AddDevice()例程,这将为新总线(如PCI总线等)创建PDO。请详细解释整个流程,这只是我的想象。然后,系统将加载PCI总线的功能驱动程序,该驱动程序将创建FDO??
这是什么FDO??为什么我需要这个??据我所知,PCI总线驱动程序也应该遵循根总线所做的相同操作,枚举其子级并为它们创建PDO,或者通过这个FDO,它们的意思是仅PDO??我很困惑:(!!

你到底在做什么,或者你只是想学习?我只是想知道你怎么会在这堆东西中名列前茅

PDO=物理设备对象

FDO=功能设备对象

PDO作为物理设备,但它不一定是物理设备。它本质上是总线上的设备与总线本身之间的接口。MSDN对此进行了详细介绍

这是一个使用U盘的例子,很好地说明了两者的区别

是一个更深入的解释和重要的引用

如果您的参考点是PCI总线,则PCI.sys是功能驱动程序。但如果您的参考点是ProSoftware Gizmo设备,则PCI.sys是总线驱动程序。这种双重角色在PnP设备树中是典型的。用作总线功能驱动程序的驱动程序也用作总线子设备的总线驱动程序

您还拥有过滤器驱动程序,允许您坐在PDO和FDO之间,开始做一些顽皮的事情,如隐藏文件、POC rootkit等。在此阶段,您可以添加额外的功能,或完全阻止访问PDO

这里是所有的MSDN链接


如果这还不清楚,请随时发回。

根据我的说法,PCI总线驱动程序也应该遵循根总线所做的相同操作,枚举其子级并为它们创建PDO
--
错误!

如果您正在谈论WDM,PnP Manager将创建PDO。在此之前,
您必须在
DriverEntry()
中创建它(在检测到设备后)

以下是摘录表格“为Microsoft Windows驱动程序模型编程”,第二版,Walter One:

- PDO stands for physical device object. The bus driver uses this
   object to represent the connection between the device and  the bus. 
    
 - FDO stands for function device object. The function driver uses
   this object to manage the functionality of the device.   
 - FiDO stands
   for filter device object. A filter driver uses this object as a place
   to store the information it needs to keep  about the hardware and its
   filtering activities. (The early beta releases of the Windows 2000
   DDK used the term FiDO,  and I adopted it then. The DDK no longer
   uses this term because, I guess, it was considered too frivolous.)

希望这对您有所帮助。

非常感谢您,先生,我会阅读这些链接,如果我想继续阅读,我会将您回复:)在哪一个总线驱动程序PDO例程中创建??PDO的用途是什么?根据MSDN,是PCI总线驱动程序枚举它的子项并创建PDO。PnP管理器的角色只是将设备节点与新创建的PDO关联。