46{
50 WCHAR HardwareIdBuffer[32];
52 ULONG DummyResultLength;
59
61
63
72 {
74 goto Failure;
75 }
76
78
85 {
86 DPRINT1(
"Failed to attach FDO\n");
88 goto Failure;
89 }
90
93
96 sizeof(HardwareIdBuffer),
97 HardwareIdBuffer,
98 &DummyResultLength);
100 {
101 DPRINT1(
"Failed to query the hardware ID string 0x%X\n",
Status);
102 goto Failure;
103 }
105
107 {
111 }
114 {
118 }
122 {
126 }
127 else
128 {
129 DPRINT1(
"Unrecognized hardware '%wZ'\n", &HardwareId);
131 goto Failure;
132 }
134
136
140 Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
141
143
144Failure:
146 {
149 }
150
152 {
154 }
155
157}
PDEVICE_OBJECT PhysicalDeviceObject
#define FILE_DEVICE_SECURE_OPEN
#define NT_SUCCESS(StatCode)
IO_DPC_ROUTINE InPortDpcForIsr
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
struct _MOUSE_INPUT_DATA MOUSE_INPUT_DATA
#define MOUSE_INPORT_HARDWARE
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
#define STATUS_DEVICE_REMOVED
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
#define FILE_DEVICE_INPORT_PORT
#define RTL_CONSTANT_STRING(s)
#define RtlZeroMemory(Destination, Length)
#define STATUS_NO_SUCH_DEVICE
_Must_inspect_result_ _In_ WDFDEVICE Fdo
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
#define IoInitializeRemoveLock(Lock, AllocateTag, MaxLockedMinutes, HighWatermark)
@ DevicePropertyHardwareID