Hi All,
I am writing a function driver and was wondering what will happen if the addDevice callback returns an error. For example lets say a addDevice is doing the following:-
- Register power management callbacks
- Register FDO’s cleanup and destroy callbacks.
- calls WdfDeviceCreate
- calls WdfDeviceCreateDeviceInterface
- create a Manual Dispatch queue
Now lets say while creating queues, the driver fails (for whatever reason) and I return the error status to the above layer. Will the framework delete the device object and cleanup the device interface or when I detect a error in step-5 I will have to perform the cleanup?
Regards
- Aj