Device object and Driver object

I have recently started reading about windows driver development and WDF.
While reading, I came across function WdfDeviceCreate that creates PDO or Function DO in EvtDeviceAdd callback routine.
In most of the sample drivers(for eg. OSR Fx2 USB) that I have read, it looks like only one call to WdfDeviceCreate is done.
I have following question:

  1. From my understanding we need both bus and filter device object for proper operation of driver, is that correct?
  2. If both DO(bus and Function) are needed, why is only one call to WdfDeviceCreate function is done?
  3. If only Function or Bus driver is needed at a time, how do we determine which object needs to be created(I am wondering about any example/use case)
  4. By default, when we use WdfDeviceCreate function, will it create Bus DO or function DO?
  5. When Framework wants to send requests to driver, will it send request to device object or driver object(from my understanding device object will receive request since they represent the driver object in WDF, is that correct?)
    Sorry, if the questions are too basic. Any resource that can help me understand WDF is appreciated(currently using MSDN documentation only).
  1. In the typical scenario, the bus driver already exists (PCI, USB, etc). The bus driver is the one that notices your hardware has arrived and creates a PDO, which causes PnP to go searching for your driver. Your function driver only creates the FDO to put on top of that.
  2. The typical driver is a function driver. In some cases, you may need to have additional driver layers above you. In that case, you create your own PDOs, and that automatically makes you a bus driver. The difference between bus driver and function driver is not as significant as you imply. It’s not two completely separate types of driver. A bus driver is just a driver that creates PDOs.
  3. This distinction does not exist. Both bus drivers and function drivers create an FDO. If you create child devices, then you are a bus driver.
  4. Requests are always sent to a device object. If there are several of the same type of hardware in a computer, you will have many device objects but only one driver object. The driver object has the callbacks, so that’s how the system finds the routines to call, but the request is aimed at a device object.