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

Ami*_*ira 5 windows windows-kernel

我正在研究自己的Windows设备驱动程序,我发现很难区分PDO和FDO.让我告诉你,如果我错了,我头脑中的流量会纠正我!

系统启动时,它会加载将创建FDO的根总线驱动程序.现在它将枚举其子设备,并且我想在将找到一个新的子项并且该方法将通知PNP管理器时将调用总线驱动程序的一些热插拔方法.PNP管理器将调用根总线驱动程序的AddDevice()例程,并将为新总线创建PDO,如PCI等等.请详细解释整个流程,这只是我的想象.然后记录系统将加载PCI总线的功能驱动程序,这将创建FDO ?? 这个FDO是什么?为什么我需要那个?根据我的说法PCI总线驱动程序也应该遵循与根总线相同的操作,枚举其子节点并为它们创建PDO,或者通过这个FDO它们仅意味着PDO?我很困惑:( !!

djg*_*ndy 10

你在做什么,或者你只是想学习?我只是想知道你是如何在筹码中结束这个低点的.

PDO =物理设备对象

FDO =功能设备对象

PDO 充当物理设备,但它不一定是物理设备.它本质上是总线上的设备和总线本身之间的接口.这在MSDN上已经很好地介绍了.

是一个使用USB记忆棒的例子,这很好地说明了差异.

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

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

你也有过滤器驱动程序,它允许你坐在PDO和FDO之间,并开始做顽皮的东西,如隐藏文件,POC rootkit等.在这个阶段,你可以添加额外的功能,或完全阻止访问PDO.

这里是所有MSDN链接.

http://msdn.microsoft.com/en-us/library/windows/hardware/hh439632(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ ff554721(v = vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/hh439643(v=vs.85).aspx http://msdn.microsoft.com/ en-us/library/windows/hardware/ff554731(v = vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff564859(v=vs.85).aspx http://technet.microsoft.com/en-us/library/cc776371(v=ws.10).aspx

如果这不能为您清除,请随时回复.


anh*_*dbk 6

Windows 驱动程序模型中设备对象和驱动程序的分层。

以下是“对 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.)
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助你。