mirror of
https://github.com/nefarius/ViGEmBus.git
synced 2026-11-27 06:41:02 +00:00
Hardened device type checks
Removed obsolete code
This commit is contained in:
1 parent
b5ebcca496
commit
fe1dcddc6a
5 files changed
+37
-107
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user