Commit 3eb8c6cd authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidclass.sys: Set IoStatus.Information in IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS.

parent 5e57887b
...@@ -560,11 +560,13 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp) ...@@ -560,11 +560,13 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
{ {
if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(ULONG)) if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(ULONG))
{ {
irp->IoStatus.Information = 0;
irp->IoStatus.Status = rc = STATUS_BUFFER_TOO_SMALL; irp->IoStatus.Status = rc = STATUS_BUFFER_TOO_SMALL;
} }
else else
{ {
*(ULONG *)irp->AssociatedIrp.SystemBuffer = RingBuffer_GetSize(ext->u.pdo.ring_buffer); *(ULONG *)irp->AssociatedIrp.SystemBuffer = RingBuffer_GetSize(ext->u.pdo.ring_buffer);
irp->IoStatus.Information = sizeof(ULONG);
rc = irp->IoStatus.Status = STATUS_SUCCESS; rc = irp->IoStatus.Status = STATUS_SUCCESS;
} }
break; break;
......
...@@ -2750,7 +2750,7 @@ static void test_hid_device(DWORD report_id, DWORD polled) ...@@ -2750,7 +2750,7 @@ static void test_hid_device(DWORD report_id, DWORD polled)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = HidD_GetNumInputBuffers(file, &count); ret = HidD_GetNumInputBuffers(file, &count);
ok(ret, "HidD_GetNumInputBuffers failed last error %u\n", GetLastError()); ok(ret, "HidD_GetNumInputBuffers failed last error %u\n", GetLastError());
todo_wine ok(count == 32, "HidD_GetNumInputBuffers returned %u\n", count); ok(count == 32, "HidD_GetNumInputBuffers returned %u\n", count);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = HidD_SetNumInputBuffers(file, 1); ret = HidD_SetNumInputBuffers(file, 1);
...@@ -2769,7 +2769,7 @@ static void test_hid_device(DWORD report_id, DWORD polled) ...@@ -2769,7 +2769,7 @@ static void test_hid_device(DWORD report_id, DWORD polled)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = HidD_GetNumInputBuffers(file, &count); ret = HidD_GetNumInputBuffers(file, &count);
ok(ret, "HidD_GetNumInputBuffers failed last error %u\n", GetLastError()); ok(ret, "HidD_GetNumInputBuffers failed last error %u\n", GetLastError());
todo_wine ok(count == 16, "HidD_GetNumInputBuffers returned %u\n", count); ok(count == 16, "HidD_GetNumInputBuffers returned %u\n", count);
async_file = CreateFileA(iface_detail->DevicePath, FILE_READ_ACCESS | FILE_WRITE_ACCESS, async_file = CreateFileA(iface_detail->DevicePath, FILE_READ_ACCESS | FILE_WRITE_ACCESS,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
...@@ -2790,7 +2790,7 @@ static void test_hid_device(DWORD report_id, DWORD polled) ...@@ -2790,7 +2790,7 @@ static void test_hid_device(DWORD report_id, DWORD polled)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = HidD_GetNumInputBuffers(async_file, &count); ret = HidD_GetNumInputBuffers(async_file, &count);
ok(ret, "HidD_GetNumInputBuffers failed last error %u\n", GetLastError()); ok(ret, "HidD_GetNumInputBuffers failed last error %u\n", GetLastError());
todo_wine ok(count == 2, "HidD_GetNumInputBuffers returned %u\n", count); ok(count == 2, "HidD_GetNumInputBuffers returned %u\n", count);
count = 0xdeadbeef; count = 0xdeadbeef;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = HidD_GetNumInputBuffers(file, &count); ret = HidD_GetNumInputBuffers(file, &count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment