Aric Stewart : winebus.sys: IOCTL_HID_SET_OUTPUTREPORT for iohid.

Alexandre Julliard julliard at winehq.org
Tue Nov 8 13:39:36 CST 2016


Module: wine
Branch: master
Commit: 45a7f9f04713b09c93f3b0dc1e7ceca39dae40cc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=45a7f9f04713b09c93f3b0dc1e7ceca39dae40cc

Author: Aric Stewart <aric at codeweavers.com>
Date:   Mon Nov  7 13:42:41 2016 -0600

winebus.sys: IOCTL_HID_SET_OUTPUTREPORT 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 | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c
index e728b34..3b4b0a9 100644
--- a/dlls/winebus.sys/bus_iohid.c
+++ b/dlls/winebus.sys/bus_iohid.c
@@ -218,8 +218,19 @@ static NTSTATUS begin_report_processing(DEVICE_OBJECT *device)
 
 static NTSTATUS set_output_report(DEVICE_OBJECT *device, UCHAR id, BYTE *report, DWORD length, ULONG_PTR *written)
 {
-    *written = 0;
-    return STATUS_NOT_IMPLEMENTED;
+    IOReturn result;
+    struct platform_private *private = impl_from_DEVICE_OBJECT(device);
+    result = IOHIDDeviceSetReport(private->device, kIOHIDReportTypeOutput, id, report, length);
+    if (result == kIOReturnSuccess)
+    {
+        *written = length;
+        return STATUS_SUCCESS;
+    }
+    else
+    {
+        *written = 0;
+        return STATUS_UNSUCCESSFUL;
+    }
 }
 
 static NTSTATUS get_feature_report(DEVICE_OBJECT *device, UCHAR id, BYTE *report, DWORD length, ULONG_PTR *read)




More information about the wine-cvs mailing list