Zebediah Figura : hidclass.sys: Expose an ioctl to retrieve the raw input handle.
Alexandre Julliard
julliard at winehq.org
Thu Jun 9 16:28:34 CDT 2022
Module: wine
Branch: master
Commit: b68d2aad192e13fa182b0c33afb64af91395594b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b68d2aad192e13fa182b0c33afb64af91395594b
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Jun 9 20:32:50 2022 +0200
hidclass.sys: Expose an ioctl to retrieve the raw input handle.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/hidclass.sys/device.c | 12 ++++++++++++
include/wine/hid.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index 9d917bbc674..7c0dbdcbc10 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -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;
diff --git a/include/wine/hid.h b/include/wine/hid.h
index 236888cbdc7..6a92317551f 100644
--- a/include/wine/hid.h
+++ b/include/wine/hid.h
@@ -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 */
More information about the wine-cvs
mailing list