- fix a bug in WdmAudControlDeviceType
- clear handle value when opening device interface key fails
svn path=/trunk/; revision=72979
}
else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
{
- Result = WdmAudGetWaveInDeviceCount();
+ Result = WdmAudGetWaveOutDeviceCount();
}
else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
{
- Result = WdmAudGetWaveOutDeviceCount();
+ Result = WdmAudGetWaveInDeviceCount();
}
else if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE)
{
/* open device interface key */
Status = IoOpenDeviceInterfaceRegistryKey(&KeyName, GENERIC_READ | GENERIC_WRITE, OutKey);
+
+ if (!NT_SUCCESS(Status))
+ {
+ *OutKey = NULL;
+ }
+
#if 0
if (!NT_SUCCESS(Status))
{