Hardened device type checks

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

No files matched your search

+13 -2
View File
@@ -53,8 +53,13 @@ namespace ViGEm::Bus::Core
EmulationTargetPDO(ULONG Serial, LONG SessionId, USHORT VendorId, USHORT ProductId);
virtual ~EmulationTargetPDO() = default;
static bool GetPdoBySerial(IN WDFDEVICE ParentDevice, IN ULONG SerialNo, OUT EmulationTargetPDO** Object);
static bool GetPdoByTypeAndSerial(
IN WDFDEVICE ParentDevice,
IN VIGEM_TARGET_TYPE Type,
IN ULONG SerialNo,
OUT EmulationTargetPDO** Object
);
virtual NTSTATUS PdoPrepareDevice(PWDFDEVICE_INIT DeviceInit,
PUNICODE_STRING DeviceId,
@@ -110,6 +115,12 @@ namespace ViGEm::Bus::Core
static EVT_WDF_DEVICE_CONTEXT_CLEANUP EvtDeviceContextCleanup;
static bool GetPdoBySerial(
IN WDFDEVICE ParentDevice,
IN ULONG SerialNo,
OUT EmulationTargetPDO** Object
);
protected:
static const ULONG _maxHardwareIdLength = 0xFF;