Commit 674080da authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

hid: Implement HidD_GetAttributes.

parent eac15cae
@ stub HidD_FlushQueue @ stub HidD_FlushQueue
@ stdcall HidD_FreePreparsedData(ptr) @ stdcall HidD_FreePreparsedData(ptr)
@ stub HidD_GetAttributes @ stdcall HidD_GetAttributes(long ptr)
@ stub HidD_GetConfiguration @ stub HidD_GetConfiguration
@ stdcall HidD_GetFeature(long ptr long) @ stdcall HidD_GetFeature(long ptr long)
@ stdcall HidD_GetHidGuid(ptr) @ stdcall HidD_GetHidGuid(ptr)
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "hidusage.h" #include "hidusage.h"
#include "ddk/hidclass.h" #include "ddk/hidclass.h"
#include "ddk/hidpi.h" #include "ddk/hidsdi.h"
WINE_DEFAULT_DEBUG_CHANNEL(hid); WINE_DEFAULT_DEBUG_CHANNEL(hid);
...@@ -45,6 +45,24 @@ BOOLEAN WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData) ...@@ -45,6 +45,24 @@ BOOLEAN WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData)
return TRUE; return TRUE;
} }
BOOLEAN WINAPI HidD_GetAttributes(HANDLE HidDeviceObject, PHIDD_ATTRIBUTES Attr)
{
HID_COLLECTION_INFORMATION info;
BOOLEAN ret;
TRACE("(%p %p)\n", HidDeviceObject, Attr);
ret = DeviceIoControl(HidDeviceObject, IOCTL_HID_GET_COLLECTION_INFORMATION, NULL, 0, &info, sizeof(HID_COLLECTION_INFORMATION), NULL, NULL);
if (ret)
{
Attr->VendorID = info.VendorID;
Attr->ProductID = info.ProductID;
Attr->VersionNumber = info.VersionNumber;
}
return ret;
}
BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength) BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength)
{ {
TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength);
......
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
typedef LONG NTSTATUS; typedef LONG NTSTATUS;
#endif #endif
typedef struct _HIDD_ATTRIBUTES {
ULONG Size;
USHORT VendorID;
USHORT ProductID;
USHORT VersionNumber;
} HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES;
BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength); BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength);
void WINAPI HidD_GetHidGuid(LPGUID guid); void WINAPI HidD_GetHidGuid(LPGUID guid);
BOOLEAN WINAPI HidD_GetInputReport(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength); BOOLEAN WINAPI HidD_GetInputReport(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength);
...@@ -35,5 +42,6 @@ BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG ...@@ -35,5 +42,6 @@ BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG
BOOLEAN WINAPI HidD_SetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength); BOOLEAN WINAPI HidD_SetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength);
BOOLEAN WINAPI HidD_GetPreparsedData( HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData); BOOLEAN WINAPI HidD_GetPreparsedData( HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData);
BOOLEAN WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData); BOOLEAN WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData);
BOOLEAN WINAPI HidD_GetAttributes(HANDLE HidDeviceObject, PHIDD_ATTRIBUTES Attr);
#endif /* __WINE_HIDSDI_H */ #endif /* __WINE_HIDSDI_H */
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