[wdmaudiodev] Re: Is there a way to force clearing device property cache on device uninstallation?
- From: Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
- To: Matthew van Eerde <wdmaudiodev@xxxxxxxxxxxxx>
- Date: Sat, 19 Jan 2019 12:20:58 +0100
So if the hardware ID changes, that invalidates the cache.
No, changing of hardware ID does not invalidate the cache because HW
ID of a virtual device is not a part of the interface path. Interface path
device instance ID, category GUID, and interface reference name.
Instance IDs are generated by the system, sequentially. So if you
install a virtual device with HW ID "VirtualDeviceFirst", it gets
Instance ID "ROOT\MEDIA\0000". If you uninstall it, and then install
another virtual device with HW ID "VirtualDeviceSecond", it gets the
same Instance ID. If interface categories and interface names are the
same, full paths will be equal too.
Maybe it would be better to create an unique key for the device
instance instead of ROOT\MEDIA. You suggested to create a subkey
directly in ENUM\ROOT, but we must take sure that subkey name is
What algorithm are you using to generate pin friendly names? Would
it make sense to generate the interface name according to the same
algorithm, so each thingy would have its own cache?
I support several custom builds of the same virtual audio device
driver. Hardware IDs are unique but reference names appended to the
interface name are the same. Because Instance IDs are generated by the
system, full interface paths may become the same.
How exactly are you uninstalling the device? Are you removing the
driver from the PDO? Are you removing the driver from the driver
cache? Are you actually removing the PDO itself?
I use the common method (DIF_REMOVE+DI_REMOVEDEVICE_GLOBAL, then
SetupUninstallOEMInf). It actually removes the PDO and the driver from
the driver cache. Worked fine in all Windows versions, until MMDevice
cache problems started to occur in Win10.
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
URL to WDMAUDIODEV page:
Other related posts: