hid: Translate HidD_ functions to their IOCTLs.

This commit is contained in:
Aric Stewart 2015-06-25 14:26:53 -05:00 committed by Alexandre Julliard
parent 5b882003fe
commit 4c6507d94c
1 changed files with 12 additions and 10 deletions

View File

@ -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);
}