Use WdfDeviceGetIoTarget(device) to get the default I/O target for the device that shares the same lifetime as the device. Done to more easily get the HWID also from I/O targets in a later PR.
WinDBG output when connecting the mouse:
TailLight: DriverEntry - WDF version built on Mar 11 2024 02:14:34
TailLight: PdoName: \Device\000000b9
TailLight: HardwareId: HID\VID_045E&PID_082A&REV_0095&MI_01&Col05
...
This shows that the driver still functions as before, and is still able to retrieve the PDO name and HWID.
Use
WdfDeviceGetIoTarget(device)
to get the default I/O target for the device that shares the same lifetime as the device. Done to more easily get the HWID also from I/O targets in a later PR.WinDBG output when connecting the mouse:
This shows that the driver still functions as before, and is still able to retrieve the PDO name and HWID.