From 4c6507d94cb3b13fc3f4ac18cf02cf72425b46d6 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Thu, 25 Jun 2015 14:26:53 -0500 Subject: [PATCH] hid: Translate HidD_ functions to their IOCTLs. --- dlls/hid/hidd.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/dlls/hid/hidd.c b/dlls/hid/hidd.c index 18a033c990a..144e804e3bd 100644 --- a/dlls/hid/hidd.c +++ b/dlls/hid/hidd.c @@ -2,6 +2,7 @@ * Human Input Devices * * Copyright (C) 2006 Kevin Koltzau + * Copyright (C) 2015 Aric Stewart * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,6 +28,9 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" +#include "winternl.h" +#include "winioctl.h" +#include "ddk/wdm.h" #include "ddk/hidclass.h" @@ -34,10 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(hid); BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength) { - static int count = 0; - if (!count++) - FIXME("(%p %p %u) stub\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return FALSE; + TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); + return DeviceIoControl(HidDeviceObject, IOCTL_HID_GET_FEATURE, NULL, 0, ReportBuffer, ReportBufferLength, NULL, NULL); } void WINAPI HidD_GetHidGuid(LPGUID guid) @@ -48,18 +50,18 @@ void WINAPI HidD_GetHidGuid(LPGUID guid) BOOLEAN WINAPI HidD_GetManufacturerString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength) { - FIXME("(%p %p %u) stub\n", HidDeviceObject, Buffer, BufferLength); - return FALSE; + TRACE("(%p %p %u) \n", HidDeviceObject, Buffer, BufferLength); + return DeviceIoControl(HidDeviceObject, IOCTL_HID_GET_MANUFACTURER_STRING, NULL, 0, Buffer, BufferLength, NULL, NULL); } BOOLEAN WINAPI HidD_SetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength) { - FIXME("(%p %p %u) stub\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return FALSE; + TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); + return DeviceIoControl(HidDeviceObject, IOCTL_HID_SET_FEATURE, ReportBuffer, ReportBufferLength, NULL, 0, NULL, NULL); } BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength) { - FIXME("(%p %p %u) stub\n", HidDeviceObject, Buffer, BufferLength); - return FALSE; + TRACE("(%p %p %u)\n", HidDeviceObject, Buffer, BufferLength); + return DeviceIoControl(HidDeviceObject, IOCTL_HID_GET_PRODUCT_STRING, NULL, 0, Buffer, BufferLength, NULL, NULL); }