Hi Guys,
Your help will be truly appreciated.
We’d developed a virtual volume driver that we’d been using in order to export some data on simple removable storage devices.
Recently, we’d tried to make the virtual volume “mountable”, by creating a fake PDO (using IoReportDetectedDevice) and attaching our device objects onto it.
It seem to work very well, but the real problems start with the fake PDO that outlives our device instances :/.
If we’re keeping the fake PDO (== not uninstalling it manually, before reboot), when we’re calling IoReportDetectedDevice, after reboot, the call usually fails with STATUS_NO_SUCH_DEVICE (I’m assuming that the PnP Manager is recycling the ‘old’ PDOs, rather than create new ones).
Do you know if this is the case, or why does the function call fails? Is there a way to properly reuse the fake PDOs, after reboot, and hence overcoming the issue?
What is the best way to remove such a device?
I can guess that most of you will recommend rewriting the whole solution into having a dedicated bus driver that will handle my devices, but I just don’t have the time :(.
I don’t want to cleanup these devices, using UM SetupDi* API, as it may cause some unwanted race conditions (for example, if the system bugchecks or the UM app lags, I won’t be able to delete them on time).
Is there some other, sound, elegant and correct way to remove these devices?
Thanks in advance,
Leonid.