From: Sanskar Jaiswal <phoenix2810@protonmail.com> query_hardware_ids() builds the hardware ids list from vid/pid, usage and HID_DEVICE strings, but never includes the PDO's own device id. For composite USB devices this id carries the &MI_xx interface index, which is how Windows lets applications identify which interface of a multi-interface device a given HID device object belongs to. Add it as the most specific (first) entry. Signed-off-by: Sanskar Jaiswal <phoenix2810@protonmail.com> --- dlls/hidclass.sys/pnp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index 87531104354..585f04a7992 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -430,7 +430,8 @@ static WCHAR *query_hardware_ids(DEVICE_OBJECT *device) WCHAR *dst; DWORD size; - size = sizeof(vid_pid_format); + size = (wcslen(pdo->base.device_id) + 1) * sizeof(WCHAR); + size += sizeof(vid_pid_format); size += sizeof(vid_usage_format); size += sizeof(usage_format); size += sizeof(hid_format); @@ -438,6 +439,7 @@ static WCHAR *query_hardware_ids(DEVICE_OBJECT *device) if ((dst = ExAllocatePool(PagedPool, size + sizeof(WCHAR)))) { DWORD len = size / sizeof(WCHAR), pos = 0; + pos += swprintf( dst + pos, len - pos, L"%s", pdo->base.device_id ) + 1; pos += swprintf( dst + pos, len - pos, vid_pid_format, info->VendorID, info->ProductID ) + 1; pos += swprintf( dst + pos, len - pos, vid_usage_format, info->VendorID, desc->UsagePage, desc->Usage ) + 1; pos += swprintf( dst + pos, len - pos, usage_format, desc->UsagePage, desc->Usage ) + 1; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11745