[Bug 21023] New: SetupDiOpenDevRegKey() returns wrong HKEY
http://bugs.winehq.org/show_bug.cgi?id=21023 Summary: SetupDiOpenDevRegKey() returns wrong HKEY Product: Wine Version: 1.1.34 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: setupapi AssignedTo: wine-bugs(a)winehq.org ReportedBy: mdealencar(a)gmail.com Created an attachment (id=25222) --> (http://bugs.winehq.org/attachment.cgi?id=25222) bug example In a Windows XP system SetupDiOpenDevRegKey() returns the "Device Parameters" HKEY under the device instance corresponding to the supplied (DeviceInfoSet, &DeviceInfoData) pair. Wine's SetupDiOpenDevRegKey() returns the device instance HKEY instead. The relevant registry keys are not created by Wine, so I had to import them from a Windows XP system Example: Windows HKEY returned corresponds to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_0451&Pid_6951\5&5a20206&0&1\Device Parameters Wine HKEY returned corresponds to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_0451&Pid_6951\5&5a20206&0&1 The attached registry patches and source code enable the reproduction of the bug. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 --- Comment #1 from Mauricio de Alencar <mdealencar(a)gmail.com> 2009-12-15 14:32:22 --- Created an attachment (id=25223) --> (http://bugs.winehq.org/attachment.cgi?id=25223) relevant registry entries this must be merged with the registry for the example code to work -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor --- Comment #2 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2009-12-15 19:41:57 --- Have a real world application that depends on this? Wine doesn't support any hardware drivers, so some of that information is kind of irrelevant. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 --- Comment #3 from Juan Lang <juan_lang(a)yahoo.com> 2009-12-15 21:46:45 --- Part of the reason we can't install drivers is that setupapi is incomplete. Some drivers, e.g. USB drivers, should be possible to support. Besides, what's the point of broken code in the Wine tree? Arguing for incompleteness makes sense, but I don't see the point in just plain wrong code if it can be helped. (Note: I probably wrote the code in question. Oops.) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 --- Comment #4 from Mauricio de Alencar <mdealencar(a)gmail.com> 2009-12-16 04:10:57 --- The application that I need which depends on this is an utility program that configures an USB DAQ module (Novus myPCLab). The module works well with the ti_usb_3410_5052 kernel module and can be accessed from wine through a COM_ port pointing to /dev/ttyACM_. The config program, though, browses through the registry to locate the device, and fails because of this bug. My workaround was to create the necessary registry values inside the wrong HKEY returned. By the way, the example program can be compiled with: i586-mingw32msvc-gcc -o bug_example_SetupDiOpenDevRegKey.exe bug_example_SetupDiOpenDevRegKey.c -lsetupapi It will list the subkeys of the HKEY returned from SetupDiOpenDevRegKey(). Under Wine it shows three registry keys, among them the "Device Parameters" one. Under Windows it shows nothing (the "Device Parameters" has no subkeys). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 --- Comment #5 from Juan Lang <juan_lang(a)yahoo.com> 2009-12-16 13:33:28 --- It seems like you have enough knowledge to fix this yourself. Why not have a go? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25222|text/x-csrc |text/plain mime type| | -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 --- Comment #6 from Austin English <austinenglish(a)gmail.com> 2012-04-02 00:26:20 CDT --- In 1.5.1, nothing is printed, and the return value is 1. Added some printf's, it's failing at this call: HKEY KeyDevice; DWORD len = MAX_NAME_PORTS; if (!SetupDiEnumDeviceInfo(DeviceInfoSet,numDev,&DeviceInfoData)) { SetupDiDestroyDeviceInfoList(DeviceInfoSet); return 1; } -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=21023 Juan Lang <juan.lang(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #7 from Juan Lang <juan.lang(a)gmail.com> 2012-04-02 15:03:24 CDT --- This deserves confirmation, then. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
https://bugs.winehq.org/show_bug.cgi?id=21023 --- Comment #8 from Austin English <austinenglish(a)gmail.com> --- austin(a)aw25 ~ $ winegcc -m32 -o bug_example_SetupDiOpenDevRegKey.exe bug_example_SetupDiOpenDevRegKey.c -lsetupapi ; echo $? 0 austin(a)aw25 ~ $ wine bug_example_SetupDiOpenDevRegKey.exe.so ; echo $? 1 austin(a)aw25 ~ $ wine --version wine-1.7.23 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=21023 Zebediah Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com Fixed by SHA1| |486fffa45c47fa102a40f88ea4f | |46c74fbd7640c Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #9 from Zebediah Figura <z.figura12(a)gmail.com> --- Fixed by <https://source.winehq.org/git/wine.git/commit/486fffa45c47fa102a40f88ea4f46c74fbd7640c>. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=21023 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.3. -- 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.
participants (1)
-
wine-bugs@winehq.org