http://bugs.winehq.org/show_bug.cgi?id=32225
Bug #: 32225 Summary: LoadLibrary succeeds when it should fail Product: Wine Version: 1.5.17 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: djelinski1@gmail.com Classification: Unclassified
I was checking how .NET handles ODBC connections under wine. I used winetricks jet40 mdac28 dotnet20 to install natives. Then I run my application. An attempt to use OdbcConnection failed with some unixODBC error. The relay log showed the following:
0009:Call KERNEL32.LoadLibraryExW(001a9b68 L"C:\windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\odbc32.dll",00000000,00000008) ret=79e862c8 0009:Call PE DLL (proc=0x7dde42c0,module=0x7ddd0000 L"odbc32.dll",reason=PROCESS_ATTACH,res=(nil)) 0009:Call KERNEL32.DisableThreadLibraryCalls(7ddd0000) ret=7ddde814 0009:Ret KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=7ddde814 (...) 0009:Ret PE DLL (proc=0x7dde42c0,module=0x7ddd0000 L"odbc32.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0009:Ret KERNEL32.LoadLibraryExW() retval=7ddd0000 ret=79e862c8
The listed directory does not contain odbc32.dll, so this call should have failed. Instead it loaded wine's ODBC.
On a side note, setting odbc32 to native instead of native,builtin worked.
http://bugs.winehq.org/show_bug.cgi?id=32225
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX
--- Comment #1 from Alexandre Julliard julliard@winehq.org 2012-11-14 16:01:14 CST --- That's how it's intended to work.
http://bugs.winehq.org/show_bug.cgi?id=32225
--- Comment #2 from Daniel Jelinski djelinski1@gmail.com 2012-11-15 03:59:01 CST --- Why does it have to work like that? What would we have to break in order to fix this? I looked for some discussion/explanation of this behaviour, found none.
http://bugs.winehq.org/show_bug.cgi?id=32225
--- Comment #3 from Austin English austinenglish@gmail.com 2012-11-15 13:33:39 CST --- (In reply to comment #2)
Why does it have to work like that? What would we have to break in order to fix this? I looked for some discussion/explanation of this behaviour, found none.
You had odbc32 set to native,builtin. When loading native failed, it fell back to wine's builtin version. As you found, setting it to native only enables your desired behavior.
http://bugs.winehq.org/show_bug.cgi?id=32225
--- Comment #4 from Daniel Jelinski djelinski1@gmail.com 2012-11-16 02:38:59 CST --- (In reply to comment #3)
You had odbc32 set to native,builtin. When loading native failed, it fell back to wine's builtin version. As you found, setting it to native only enables your desired behavior.
Thanks for explanation. In that case, shouldn't winetricks set installed libraries to native only?
http://bugs.winehq.org/show_bug.cgi?id=32225
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Austin English austinenglish@gmail.com 2012-11-16 03:44:14 CST --- (In reply to comment #4)
(In reply to comment #3)
You had odbc32 set to native,builtin. When loading native failed, it fell back to wine's builtin version. As you found, setting it to native only enables your desired behavior.
Thanks for explanation. In that case, shouldn't winetricks set installed libraries to native only?
I don't see why.