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:
- From my understanding we need both bus and filter device object for proper operation of driver, is that correct?
- If both DO(bus and Function) are needed, why is only one call to WdfDeviceCreate function is done?
- 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)
- By default, when we use WdfDeviceCreate function, will it create Bus DO or function DO?
- 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).