i m new in windows , while reading WDM driver , i encountered about device object (PDO and FDO) .I m not able to visualize why we need 2 different device object as after loading the driver why we again create FDO in ADDDevice routine . we can use PDO there as it represents same device.
Asked
Active
Viewed 1,803 times
1 Answers
3
The PDO and the FDO have to be separate objects because they use different device drivers. For example, a PCI NIC device will have a PDO generated by the device driver for the PCI bus, and an FDO generated by the device driver for the NIC.
Occasionally the bus and the device do share the same driver, in which case you don't need an FDO. You can use a raw PDO, which combines a PDO and FDO in a single device object.
See Example WDM Device Stack in MSDN for a picture, and PDOs, part 1 for a short description.

Harry Johnston
- 35,639
- 6
- 68
- 158
-
Thanx for ur response , in case of cooked pdo , is it right to say PDO is for device installation and FDO is for driver installation of that particular device which is attached to the bus.... and can u plz give me an example for raw pdo creation ????? – uday singh Oct 18 '13 at 11:57
-
The PDO is used for device detection, but also when operating the device. For example, when the NIC device drivers wants to send a command to the physical NIC, that command needs to go over the PCI bus. The FDO sends the command to the PDO and the PDO is responsible for getting it to the physical device. – Harry Johnston Oct 21 '13 at 20:39
-
1Raw PDOs are typically used when the driver architecture makes it convenient to have a make-believe bus, or when a device has an embedded bus. An example of the former (HID class devices) is in the linked article. An example of the latter might be, say, a single USB device that combines bluetooth and WAN; one way to do it would be to embed a standard USB hub, but it might be cheaper to embed a custom bus. The same driver could then support the custom bus, the bluetooth, and the WAN, all in a single raw PDO. – Harry Johnston Oct 21 '13 at 20:49