Commit 72216935 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

winebus.sys: IOCTL_HID_GET_DEVICE_DESCRIPTOR for iohid.

parent 3b132cb9
......@@ -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)
......
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