Aric Stewart : winebus.sys: IOCTL_HID_GET_DEVICE_DESCRIPTOR for iohid.
Alexandre Julliard
julliard at winehq.org
Tue Nov 8 13:39:35 CST 2016
Module: wine
Branch: master
Commit: 7221693538d1dfa814cf5cefd22d49f5efc8527d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7221693538d1dfa814cf5cefd22d49f5efc8527d
Author: Aric Stewart <aric at codeweavers.com>
Date: Mon Nov 7 13:42:31 2016 -0600
winebus.sys: IOCTL_HID_GET_DEVICE_DESCRIPTOR for iohid.
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Ken Thomases <ken at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winebus.sys/bus_iohid.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c
index 76db0a2..50b5d76 100644
--- a/dlls/winebus.sys/bus_iohid.c
+++ b/dlls/winebus.sys/bus_iohid.c
@@ -140,7 +140,18 @@ static int compare_platform_device(DEVICE_OBJECT *device, void *platform_dev)
static NTSTATUS get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffer, DWORD length, DWORD *out_length)
{
- return STATUS_NOT_IMPLEMENTED;
+ struct platform_private *private = impl_from_DEVICE_OBJECT(device);
+ CFDataRef data = IOHIDDeviceGetProperty(private->device, CFSTR(kIOHIDReportDescriptorKey));
+ int data_length = CFDataGetLength(data);
+ const UInt8 *ptr;
+
+ *out_length = data_length;
+ if (length < data_length)
+ return STATUS_BUFFER_TOO_SMALL;
+
+ ptr = CFDataGetBytePtr(data);
+ memcpy(buffer, ptr, data_length);
+ return STATUS_SUCCESS;
}
static NTSTATUS get_string(DEVICE_OBJECT *device, DWORD index, WCHAR *buffer, DWORD length)
More information about the wine-cvs
mailing list