Hardened device type checks

Removed obsolete code
This commit is contained in:
Benjamin Höglinger-Stelzer
2020-05-12 17:37:16 +02:00
parent b5ebcca496
commit fe1dcddc6a
5 changed files with 37 additions and 107 deletions

View File

@@ -540,6 +540,11 @@ bool ViGEm::Bus::Core::EmulationTargetPDO::GetPdoBySerial(
return true;
}
bool ViGEm::Bus::Core::EmulationTargetPDO::GetPdoByTypeAndSerial(IN WDFDEVICE ParentDevice, IN VIGEM_TARGET_TYPE Type, IN ULONG SerialNo, OUT EmulationTargetPDO** Object)
{
return (GetPdoBySerial(ParentDevice, SerialNo, Object) && (*Object)->GetType() == Type);
}
NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EvtDevicePrepareHardware(
_In_ WDFDEVICE Device,
_In_ WDFCMRESLIST ResourcesRaw,