[Bug 15336] New: DirectInputCreate(): hInst is ignored; NULL value doesn't result in an error.
http://bugs.winehq.org/show_bug.cgi?id=15336 Summary: DirectInputCreate(): hInst is ignored; NULL value doesn't result in an error. Product: Wine Version: 1.1.5 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: directx-dinput AssignedTo: wine-bugs(a)winehq.org ReportedBy: gerbilsoft(a)verizon.net While porting an application from Linux to Win32, I noticed a bug in Wine's implementation of DirectInputCreate(). Specifically, Wine allows a NULL value for hInst, whereas on Windows, specifying a NULL hInst results in error 0x80070057 ("The parameter is incorrect.") Code: HRESULT rval; LPDIRECTINPUT lpDI; HINSTANCE ghInstance = NULL; rval = DirectInputCreate(hInst, 0x0500, &lpDI, NULL); Expected Result: rval should contain 0x80070057 and lpDI should remain uninitialized. Actual Result: rval contains 0 and lpDI is initialized. -- 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=15336 Maarten Lankhorst <m.b.lankhorst(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.b.lankhorst(a)gmail.com --- Comment #1 from Maarten Lankhorst <m.b.lankhorst(a)gmail.com> 2008-09-19 20:18:00 --- Please add a test to dlls/dinput/tests for this and fix it, it's not really hard to do. :-) -- 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=15336 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |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=15336 Maarten Lankhorst <m.b.lankhorst(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|testcase | --- Comment #2 from Maarten Lankhorst <m.b.lankhorst(a)gmail.com> 2008-09-20 02:49:27 --- 'Testcase' keyword should only be added if someone attached a testcase here. Removing it. -- 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=15336 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #3 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2008-09-20 11:05:44 --- Confirming, code doesn't use/care about that parameter. -- 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=15336 --- Comment #4 from Austin English <austinenglish(a)gmail.com> 2008-09-20 12:06:17 --- (In reply to comment #2)
'Testcase' keyword should only be added if someone attached a testcase here. Removing it.
testcase - 'Bugs that have a testcase attached, in source form but not necessarily integrated into the Wine test suite.' -- 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=15336 --- Comment #5 from GerbilSoft <gerbilsoft(a)verizon.net> 2008-09-20 12:28:47 --- Created an attachment (id=16173) --> (http://bugs.winehq.org/attachment.cgi?id=16173) DirectInputCreate(): Check if hInst is NULL. Ideally, it should check that hInst matches an existing instance, but I'm unsure how to do that. -- 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=15336 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com Keywords| |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=15336 --- Comment #6 from Austin English <austinenglish(a)gmail.com> 2009-03-30 13:22:32 --- Is this still an issue in current (1.1.18 or newer) wine? -- 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=15336 --- Comment #7 from Austin English <austinenglish(a)gmail.com> 2009-10-01 20:49:01 --- Patch sent: http://www.winehq.org/pipermail/wine-patches/2009-October/079299.html -- 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=15336 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|austinenglish(a)gmail.com | -- 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=15336 Christian Costa <titan.costa(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |titan.costa(a)gmail.com --- Comment #8 from Christian Costa <titan.costa(a)gmail.com> 2012-10-12 16:55:43 CDT --- This bug is fixed. DirectInputCreate{A|W|Ex} call Initialize which does the check of the instance. Please check. static HRESULT WINAPI IDirectInputAImpl_Initialize(LPDIRECTINPUT7A iface, HINSTANCE hinst, DWORD version) { IDirectInputImpl *This = impl_from_IDirectInput7A( iface ); TRACE("(%p)->(%p, 0x%04x)\n", iface, hinst, version); if (!hinst) return DIERR_INVALIDPARAM; else if (version == 0) return DIERR_NOTINITIALIZED; -- 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=15336 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |00cpxxx(a)gmail.com Resolution| |FIXED --- Comment #9 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-10-12 21:13:28 CDT --- (In reply to comment #8)
This bug is fixed. DirectInputCreate{A|W|Ex} call Initialize which does the check of the instance. Please check.
Indeed there is a test that currently proves it's fixed AFAICS: http://source.winehq.org/source/dlls/dinput/tests/dinput.c#L174 -- 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=15336 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> 2012-10-26 13:30:47 CDT --- Closing bugs fixed in 1.5.16. -- 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.
participants (1)
-
wine-bugs@winehq.org