http://bugs.winehq.org/show_bug.cgi?id=59604 Bug ID: 59604 Summary: setupapi: CM_Get_Parent stub breaks USB HID device identification Product: Wine Version: 11.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: setupapi Assignee: wine-bugs@list.winehq.org Reporter: Robert-Gerigk@online.de Distribution: --- CM_Get_Parent() in dlls/setupapi/stubs.c is a stub that always returns CR_NO_SUCH_DEVNODE. This prevents applications from navigating the device tree to find parent USB devices for HID devices. A .NET application (KNX ETS 6.4) uses the following pattern to identify a USB license dongle: 1. Enumerate HID device interfaces via SetupDiGetClassDevs 2. For each HID device, call CM_Get_Parent to find the parent USB device node 3. Read the parent USB device properties (VID/PID) 4. If matching, open the HID device Since CM_Get_Parent always fails, the application never identifies the dongle even though Wine correctly enumerates it as a HID device. A minimal implementation that maps HID child devices to their USB parent devices (by replacing the "HID\" prefix with "USB\" in the device instance ID and looking up the result in the registry) resolves the issue. Additionally, SETUPDI_EnumerateMatchingInterfaces in devinst.c adds devices to the device info set even when they have no matching device interfaces. This causes SetupDiEnumDeviceInfo to return phantom devices that are not present, breaking applications that assume device and interface indices are synchronized. I have patches ready for both issues. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.