hidclass.sys: Expose an ioctl to retrieve the raw input handle.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-06-09 20:32:50 +02:00 committed by Alexandre Julliard
parent 64efaf26b7
commit b68d2aad19
2 changed files with 14 additions and 0 deletions

View file

@ -655,6 +655,18 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_SET_OUTPUT_REPORT:
status = hid_device_xfer_report( ext, code, irp );
break;
case IOCTL_HID_GET_WINE_RAWINPUT_HANDLE:
if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(ULONG))
status = STATUS_BUFFER_OVERFLOW;
else
{
*(ULONG *)irp->AssociatedIrp.SystemBuffer = ext->u.pdo.rawinput_handle;
irp->IoStatus.Information = sizeof(ULONG);
status = STATUS_SUCCESS;
}
break;
default:
{
ULONG code = irpsp->Parameters.DeviceIoControl.IoControlCode;

View file

@ -227,4 +227,6 @@ struct hid_preparsed_data
#define PID_USAGE_CREATE_NEW_EFFECT_REPORT ((USAGE) 0xab)
#define PID_USAGE_RAM_POOL_AVAILABLE ((USAGE) 0xac)
#define IOCTL_HID_GET_WINE_RAWINPUT_HANDLE HID_BUFFER_CTL_CODE(300)
#endif /* __WINE_PARSE_H */