From: "Rémi Bernon" Subject: [PATCH 1/6] ntoskrnl.exe/tests: Return success from IOCTL_HID_GET_STRING. Message-Id: <20210618120611.703993-1-rbernon@codeweavers.com> Date: Fri, 18 Jun 2021 14:06:06 +0200 Signed-off-by: Rémi Bernon --- This series should hopefully not interfere with the other hidclass.sys, but I'm actually sending it to get some feedback about PATCH 4. Here's a bit of context: Implementing support for reports in the HID test driver, instead of returning STATUS_NOT_IMPLEMENTED, prevent spurious reboots on Windows when reading the reports, so it has to be done. However, returning input reports immediately in non-polled mode makes Windows loop forever on device initialization, probably trying to drain any input report buffer. So we have to keep them as pending until they are read. This then causes a lock-up on Wine, unless we properly cancel the IRPs on device removal. But the lock-up happens before the minidriver gets notified of the removal, unless PATCH 4 is there. dlls/ntoskrnl.exe/tests/driver_hid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index acb51d99816..01a3747cd29 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -386,7 +386,9 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) ok(!in_size, "got input size %u\n", in_size); ok(out_size == 128, "got output size %u\n", out_size); - ret = STATUS_NOT_IMPLEMENTED; + memcpy(irp->UserBuffer, L"Wine Test", sizeof(L"Wine Test")); + irp->IoStatus.Information = sizeof(L"Wine Test"); + ret = STATUS_SUCCESS; break; default: -- 2.31.0