- fix a bug in WdmAudControlDeviceType
- clear handle value when opening device interface key fails

svn path=/trunk/; revision=72979
This commit is contained in:
Johannes Anderwald 2016-10-17 19:03:01 +00:00
parent 39544b234b
commit cad3120307
2 changed files with 8 additions and 2 deletions

View file

@ -55,11 +55,11 @@ WdmAudControlDeviceType(
} }
else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE) else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
{ {
Result = WdmAudGetWaveInDeviceCount(); Result = WdmAudGetWaveOutDeviceCount();
} }
else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE) else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
{ {
Result = WdmAudGetWaveOutDeviceCount(); Result = WdmAudGetWaveInDeviceCount();
} }
else if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE) else if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE)
{ {

View file

@ -271,6 +271,12 @@ Enum(
/* open device interface key */ /* open device interface key */
Status = IoOpenDeviceInterfaceRegistryKey(&KeyName, GENERIC_READ | GENERIC_WRITE, OutKey); Status = IoOpenDeviceInterfaceRegistryKey(&KeyName, GENERIC_READ | GENERIC_WRITE, OutKey);
if (!NT_SUCCESS(Status))
{
*OutKey = NULL;
}
#if 0 #if 0
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {