/* Open port */
Status = ObOpenObjectByPointer(
LowerDevice,
- OBJ_EXCLUSIVE | OBJ_KERNEL_HANDLE,
+ OBJ_KERNEL_HANDLE,
NULL,
0,
NULL,
/* Fill the read buffer */
TRACE_(SERENUM, "Fill the read buffer\n");
- Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count);
+ Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), (PVOID)&Count);
if (!NT_SUCCESS(Status)) goto ByeBye;
RtlInitUnicodeString(&DeviceId, L"Serenum\\Mouse");
RtlInitUnicodeString(&DeviceDescription, L"Microsoft Mouse with 3-buttons");
SerenumInitMultiSzString(&HardwareIds, "*PNP0F08", NULL);
SerenumInitMultiSzString(&CompatibleIds, "SERIAL_MOUSE", NULL);
+ break;
default:
/* Hardware id: *PNP0F01
* Compatible id: SERIAL_MOUSE
RtlInitUnicodeString(&DeviceDescription, L"Microsoft Mouse with 2-buttons or Microsoft Wheel Mouse");
SerenumInitMultiSzString(&HardwareIds, "*PNP0F01", NULL);
SerenumInitMultiSzString(&CompatibleIds, "SERIAL_MOUSE", NULL);
+ break;
}
Status = ReportDetectedDevice(DeviceObject,
&DeviceDescription, &DeviceId, &InstanceId, &HardwareIds, &CompatibleIds);