Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/hid/Makefile.in | 1 - dlls/hid/hidd.c | 88 ++++++++++++++++++++++---------------------- dlls/hid/hidp.c | 45 +++++++++++----------- 3 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/dlls/hid/Makefile.in b/dlls/hid/Makefile.in index 177a1a0c3e7..8bad2ec00de 100644 --- a/dlls/hid/Makefile.in +++ b/dlls/hid/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = hid.dll IMPORTLIB = hid
diff --git a/dlls/hid/hidd.c b/dlls/hid/hidd.c index 684ad5b5df8..bf5874d05ab 100644 --- a/dlls/hid/hidd.c +++ b/dlls/hid/hidd.c @@ -52,116 +52,116 @@ static BOOL sync_ioctl(HANDLE file, DWORD code, void *in_buf, DWORD in_len, void return ret; }
-BOOLEAN WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData) +BOOLEAN WINAPI HidD_FreePreparsedData( PHIDP_PREPARSED_DATA preparsed_data ) { - TRACE("(%p)\n", PreparsedData); - HeapFree(GetProcessHeap(), 0, PreparsedData); + TRACE( "preparsed_data %p.\n", preparsed_data ); + HeapFree( GetProcessHeap(), 0, preparsed_data ); return TRUE; }
-BOOLEAN WINAPI HidD_GetAttributes(HANDLE HidDeviceObject, PHIDD_ATTRIBUTES Attr) +BOOLEAN WINAPI HidD_GetAttributes( HANDLE file, PHIDD_ATTRIBUTES attributes ) { HID_COLLECTION_INFORMATION info; BOOLEAN ret;
- TRACE("(%p %p)\n", HidDeviceObject, Attr); + TRACE( "file %p, attributes %p.\n", file, attributes );
- ret = sync_ioctl(HidDeviceObject, IOCTL_HID_GET_COLLECTION_INFORMATION, NULL, 0, &info, sizeof(HID_COLLECTION_INFORMATION)); + ret = sync_ioctl( file, IOCTL_HID_GET_COLLECTION_INFORMATION, NULL, 0, &info, sizeof(HID_COLLECTION_INFORMATION) );
if (ret) { - Attr->Size = sizeof(HIDD_ATTRIBUTES); - Attr->VendorID = info.VendorID; - Attr->ProductID = info.ProductID; - Attr->VersionNumber = info.VersionNumber; + attributes->Size = sizeof(HIDD_ATTRIBUTES); + attributes->VendorID = info.VendorID; + attributes->ProductID = info.ProductID; + attributes->VersionNumber = info.VersionNumber; } return ret; }
-BOOLEAN WINAPI HidD_GetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength) +BOOLEAN WINAPI HidD_GetFeature( HANDLE file, void *report_buf, ULONG report_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_GET_FEATURE, NULL, 0, ReportBuffer, ReportBufferLength); + TRACE( "file %p, report_buf %p, report_len %lu.\n", file, report_buf, report_len ); + return sync_ioctl( file, IOCTL_HID_GET_FEATURE, NULL, 0, report_buf, report_len ); }
void WINAPI HidD_GetHidGuid(LPGUID guid) { - TRACE("(%p)\n", guid); + TRACE( "guid %s.\n", debugstr_guid( guid ) ); *guid = GUID_DEVINTERFACE_HID; }
-BOOLEAN WINAPI HidD_GetInputReport(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength) +BOOLEAN WINAPI HidD_GetInputReport( HANDLE file, void *report_buf, ULONG report_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_GET_INPUT_REPORT, NULL, 0, ReportBuffer, ReportBufferLength); + TRACE( "file %p, report_buf %p, report_len %lu.\n", file, report_buf, report_len ); + return sync_ioctl( file, IOCTL_HID_GET_INPUT_REPORT, NULL, 0, report_buf, report_len ); }
-BOOLEAN WINAPI HidD_GetManufacturerString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength) +BOOLEAN WINAPI HidD_GetManufacturerString( HANDLE file, void *buffer, ULONG buffer_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, Buffer, BufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_GET_MANUFACTURER_STRING, NULL, 0, Buffer, BufferLength); + TRACE( "file %p, buffer %p, buffer_len %lu.\n", file, buffer, buffer_len ); + return sync_ioctl( file, IOCTL_HID_GET_MANUFACTURER_STRING, NULL, 0, buffer, buffer_len ); }
-BOOLEAN WINAPI HidD_GetNumInputBuffers(HANDLE HidDeviceObject, ULONG *NumberBuffers) +BOOLEAN WINAPI HidD_GetNumInputBuffers( HANDLE file, ULONG *num_buffer ) { - TRACE("(%p %p)\n", HidDeviceObject, NumberBuffers); - return sync_ioctl(HidDeviceObject, IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS, NULL, 0, NumberBuffers, sizeof(*NumberBuffers)); + TRACE( "file %p, num_buffer %p.\n", file, num_buffer ); + return sync_ioctl( file, IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS, NULL, 0, num_buffer, sizeof(*num_buffer) ); }
-BOOLEAN WINAPI HidD_SetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength) +BOOLEAN WINAPI HidD_SetFeature( HANDLE file, void *report_buf, ULONG report_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_SET_FEATURE, ReportBuffer, ReportBufferLength, NULL, 0); + TRACE( "file %p, report_buf %p, report_len %lu.\n", file, report_buf, report_len ); + return sync_ioctl( file, IOCTL_HID_SET_FEATURE, report_buf, report_len, NULL, 0 ); }
-BOOLEAN WINAPI HidD_SetNumInputBuffers(HANDLE HidDeviceObject, ULONG NumberBuffers) +BOOLEAN WINAPI HidD_SetNumInputBuffers( HANDLE file, ULONG num_buffer ) { - TRACE("(%p %i)\n", HidDeviceObject, NumberBuffers); - return sync_ioctl(HidDeviceObject, IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS, &NumberBuffers, sizeof(NumberBuffers), NULL, 0); + TRACE( "file %p, num_buffer %lu.\n", file, num_buffer ); + return sync_ioctl( file, IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS, &num_buffer, sizeof(num_buffer), NULL, 0 ); }
-BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength) +BOOLEAN WINAPI HidD_GetProductString( HANDLE file, void *buffer, ULONG buffer_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, Buffer, BufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_GET_PRODUCT_STRING, NULL, 0, Buffer, BufferLength); + TRACE( "file %p, buffer %p, buffer_len %lu.\n", file, buffer, buffer_len ); + return sync_ioctl( file, IOCTL_HID_GET_PRODUCT_STRING, NULL, 0, buffer, buffer_len ); }
-BOOLEAN WINAPI HidD_GetSerialNumberString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength) +BOOLEAN WINAPI HidD_GetSerialNumberString( HANDLE file, void *buffer, ULONG buffer_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, Buffer, BufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_GET_SERIALNUMBER_STRING, NULL, 0, Buffer, BufferLength); + TRACE( "file %p, buffer %p, buffer_len %lu.\n", file, buffer, buffer_len ); + return sync_ioctl( file, IOCTL_HID_GET_SERIALNUMBER_STRING, NULL, 0, buffer, buffer_len ); }
-BOOLEAN WINAPI HidD_GetPreparsedData(HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData) +BOOLEAN WINAPI HidD_GetPreparsedData( HANDLE file, PHIDP_PREPARSED_DATA *preparsed_data ) { HID_COLLECTION_INFORMATION info; PHIDP_PREPARSED_DATA data;
- TRACE("(%p %p)\n", HidDeviceObject, PreparsedData); + TRACE( "file %p, preparsed_data %p.\n", file, preparsed_data );
- if (!sync_ioctl(HidDeviceObject, IOCTL_HID_GET_COLLECTION_INFORMATION, NULL, 0, &info, sizeof(info))) + if (!sync_ioctl( file, IOCTL_HID_GET_COLLECTION_INFORMATION, NULL, 0, &info, sizeof(info) )) return FALSE;
if (!(data = HeapAlloc(GetProcessHeap(), 0, info.DescriptorSize))) return FALSE;
- if (!sync_ioctl(HidDeviceObject, IOCTL_HID_GET_COLLECTION_DESCRIPTOR, NULL, 0, data, info.DescriptorSize)) + if (!sync_ioctl( file, IOCTL_HID_GET_COLLECTION_DESCRIPTOR, NULL, 0, data, info.DescriptorSize )) { HeapFree( GetProcessHeap(), 0, data ); return FALSE; } - *PreparsedData = data; + *preparsed_data = data; return TRUE; }
-BOOLEAN WINAPI HidD_SetOutputReport(HANDLE HidDeviceObject, void *ReportBuffer, ULONG ReportBufferLength) +BOOLEAN WINAPI HidD_SetOutputReport( HANDLE file, void *report_buf, ULONG report_len ) { - TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_SET_OUTPUT_REPORT, ReportBuffer, ReportBufferLength, NULL, 0); + TRACE( "file %p, report_buf %p, report_len %lu.\n", file, report_buf, report_len ); + return sync_ioctl( file, IOCTL_HID_SET_OUTPUT_REPORT, report_buf, report_len, NULL, 0 ); }
BOOLEAN WINAPI HidD_GetIndexedString(HANDLE file, ULONG index, void *buffer, ULONG length) { - TRACE("file %p, index %u, buffer %p, length %u.\n", file, index, buffer, length); + TRACE( "file %p, index %lu, buffer %p, length %lu.\n", file, index, buffer, length ); return sync_ioctl(file, IOCTL_HID_GET_INDEXED_STRING, &index, sizeof(index), buffer, length); }
diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index ed2fa3906bd..a1c5805c19f 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -270,7 +270,7 @@ NTSTATUS WINAPI HidP_GetScaledUsageValue( HIDP_REPORT_TYPE report_type, USAGE us struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage }; USHORT count = 1;
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, value %p, preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, value %p, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usage, value, preparsed_data, report_buf, report_len );
*value = 0; @@ -303,7 +303,7 @@ NTSTATUS WINAPI HidP_GetUsageValue( HIDP_REPORT_TYPE report_type, USAGE usage_pa struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, value %p, preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, value %p, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usage, value, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -321,8 +321,8 @@ NTSTATUS WINAPI HidP_GetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usa struct caps_filter filter = {.values = TRUE, .array = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, value_buf %p, value_len %u, " - "preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, value_buf %p, value_len %u, " + "preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usage, value_buf, value_len, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -383,8 +383,9 @@ NTSTATUS WINAPI HidP_GetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page, NTSTATUS status; USHORT limit = -1;
- TRACE( "report_type %d, collection %d, usages %p, usages_len %p, preparsed_data %p, report_buf %p, report_len %u.\n", - report_type, collection, usages, usages_len, preparsed_data, report_buf, report_len ); + TRACE( "report_type %d, usage_page %u, collection %u, usages %p, usages_len %p, preparsed_data %p, " + "report_buf %p, report_len %lu.\n", + report_type, usage_page, collection, usages, usages_len, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH;
@@ -410,7 +411,7 @@ NTSTATUS WINAPI HidP_InitializeReportForID( HIDP_REPORT_TYPE report_type, UCHAR const struct hid_value_caps *caps, *end; NTSTATUS status;
- TRACE( "report_type %d, report_id %x, preparsed_data %p, report_buf %p, report_len %u.\n", report_type, + TRACE( "report_type %d, report_id %u, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, report_id, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -439,7 +440,7 @@ ULONG WINAPI HidP_MaxUsageListLength( HIDP_REPORT_TYPE report_type, USAGE usage_ USHORT limit = -1; ULONG count = 0;
- TRACE( "report_type %d, usage_page %x, preparsed_data %p.\n", report_type, usage_page, preparsed_data ); + TRACE( "report_type %d, usage_page %u, preparsed_data %p.\n", report_type, usage_page, preparsed_data );
enum_value_caps( preparsed, report_type, 0, &filter, get_usage_list_length, &count, &limit ); return count; @@ -485,7 +486,7 @@ NTSTATUS WINAPI HidP_SetScaledUsageValue( HIDP_REPORT_TYPE report_type, USAGE us struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage }; USHORT count = 1;
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, value %d, preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, value %ld, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usage, value, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -516,7 +517,7 @@ NTSTATUS WINAPI HidP_SetUsageValue( HIDP_REPORT_TYPE report_type, USAGE usage_pa struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, value %u, preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, value %lu, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usage, value, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -534,8 +535,8 @@ NTSTATUS WINAPI HidP_SetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usa struct caps_filter filter = {.values = TRUE, .array = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, value_buf %p, value_len %u, " - "preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, value_buf %p, value_len %u, " + "preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usage, value_buf, value_len, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -590,8 +591,8 @@ NTSTATUS WINAPI HidP_SetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page, USHORT limit = 1; ULONG i, count = *usage_count;
- TRACE( "report_type %d, usage_page %x, collection %d, usages %p, usage_count %p, preparsed_data %p, " - "report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usages %p, usage_count %p, preparsed_data %p, " + "report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usages, usage_count, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -656,8 +657,8 @@ NTSTATUS WINAPI HidP_UnsetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page USHORT limit = 1; ULONG i, count = *usage_count;
- TRACE( "report_type %d, usage_page %x, collection %d, usages %p, usage_count %p, preparsed_data %p, " - "report_buf %p, report_len %u.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usages %p, usage_count %p, preparsed_data %p, " + "report_buf %p, report_len %lu.\n", report_type, usage_page, collection, usages, usage_count, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -679,8 +680,8 @@ NTSTATUS WINAPI HidP_TranslateUsagesToI8042ScanCodes(USAGE *ChangedUsageList, HIDP_KEYBOARD_MODIFIER_STATE *ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, VOID *InsertCodesContext) { - FIXME("stub: %p, %i, %i, %p, %p, %p\n", ChangedUsageList, UsageListLength, - KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext); + FIXME( "ChangedUsageList %p, UsageListLength %lu, KeyAction %u, ModifierState %p, InsertCodesProcedure %p, InsertCodesContext %p stub!\n", + ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext );
return STATUS_NOT_IMPLEMENTED; } @@ -736,7 +737,7 @@ NTSTATUS WINAPI HidP_GetSpecificButtonCaps( HIDP_REPORT_TYPE report_type, USAGE struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; const struct caps_filter filter = {.buttons = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage};
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, caps %p, caps_count %p, preparsed_data %p.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, caps %p, caps_count %p, preparsed_data %p.\n", report_type, usage_page, collection, usage, caps, caps_count, preparsed_data );
return enum_value_caps( preparsed, report_type, 0, &filter, get_button_caps, &caps, caps_count ); @@ -803,7 +804,7 @@ NTSTATUS WINAPI HidP_GetSpecificValueCaps( HIDP_REPORT_TYPE report_type, USAGE u struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; const struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage};
- TRACE( "report_type %d, usage_page %x, collection %d, usage %x, caps %p, caps_count %p, preparsed_data %p.\n", + TRACE( "report_type %d, usage_page %u, collection %u, usage %u, caps %p, caps_count %p, preparsed_data %p.\n", report_type, usage_page, collection, usage, caps, caps_count, preparsed_data );
return enum_value_caps( preparsed, report_type, 0, &filter, get_value_caps, &caps, caps_count ); @@ -868,7 +869,7 @@ NTSTATUS WINAPI HidP_GetUsagesEx( HIDP_REPORT_TYPE report_type, USHORT collectio NTSTATUS status; USHORT limit = -1;
- TRACE( "report_type %d, collection %d, usages %p, usages_len %p, preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, collection %u, usages %p, usages_len %p, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, collection, usages, usages_len, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH; @@ -980,7 +981,7 @@ NTSTATUS WINAPI HidP_GetData( HIDP_REPORT_TYPE report_type, HIDP_DATA *data, ULO NTSTATUS status; USHORT limit = -1;
- TRACE( "report_type %d, data %p, data_len %p, preparsed_data %p, report_buf %p, report_len %u.\n", + TRACE( "report_type %d, data %p, data_len %p, preparsed_data %p, report_buf %p, report_len %lu.\n", report_type, data, data_len, preparsed_data, report_buf, report_len );
if (!report_len) return HIDP_STATUS_INVALID_REPORT_LENGTH;