Reputation: 377
I've inherited a USB class compliant audio driver. It works fine in WinXP, Win7, etc.
I find that on an Italian XP machine (I haven't yet checked other languages yet) it fails to run. Our installer has (essentially) this:
...
SetupDiGetDeviceRegistryProperty( info, &data, SPDRP_DEVICEDESC, &type, (BYTE *)name, sizeof(name) ;
...
if( 0 == wcsicmp(name, "USB Audio Device") ) {
...
// install our driver
}
So, if we have the right device (USB\VID_0a73
) and if the generic driver ("USB Audio Device") is installed then we go ahead and install ours. However on the Italian machine the generic name is "USB Speakers". Our comparison fails and we don't install. It seems to me that Windows must be pulling that name from somewhere in the registry. I should probably pull from the same place and compare against that instead of a hardwired string.
I do see that name in:
HKLM\Software\Microsoft\Window NT\CurrentVersion\drivers.desc: wdmaud.drv == USB Speakers
Upvotes: 1
Views: 259
Reputation: 91260
You could use SPDRP_SERVICE
then lookup the driver from HKLM\SYSTEM\CurrentControlSet\services\<service name>\ImagePath
Upvotes: 1