http://bugs.winehq.org/show_bug.cgi?id=11170
Summary: LoadLibrary behaviour is different from the windows one Product: Wine Version: 0.9.52. Platform: All OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: hules@free.fr
Under wine (version 0.9.52), attempts to open an .exe file with LoadLibrary fails (with error ERROR_INVALID_ADDRESS), while it succeeds on windows (all versions):
The following example shows that different behaviour: (I compiled it with i386-mingw32-gcc ./test.c && cp a.exe b.exe )
#include <stdio.h> #include <stdlib.h> #include <windows.h>
int main() { const char *fname = "b.exe"; HMODULE hmod = LoadLibrary(fname); //HMODULE hmod = LoadLibraryEx(fname_, NULL, LOAD_LIBRARY_AS_DATAFILE); if (hmod) { fprintf(stderr, "loaded at %p\n", (void*)hmod); } else { fprintf(stderr, "error %x\n", (int)GetLastError()); } return 0; }
http://bugs.winehq.org/show_bug.cgi?id=11170
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2008-01-15 23:44:49 --- The following patch makes it work for me:
http://www.winehq.org/pipermail/wine-patches/2008-January/049104.html
http://bugs.winehq.org/show_bug.cgi?id=11170
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Component|-unknown |ntdll Resolution| |FIXED
--- Comment #2 from Dmitry Timoshkov dmitry@codeweavers.com 2008-01-17 09:19:00 --- This problem should be fixed in git.
http://bugs.winehq.org/show_bug.cgi?id=11170
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Dan Kegel dank@kegel.com 2008-01-28 06:11:44 --- Closing all RESOLVED FIXED bugs older than 0.9.54.
http://bugs.winehq.org/show_bug.cgi?id=11170
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other
--- Comment #4 from Austin English austinenglish@gmail.com 2012-02-23 15:22:29 CST --- Removing deprecated 'All' Platform.
http://bugs.winehq.org/show_bug.cgi?id=11170
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |bf89330fb665e7913aeb081bbb1 | |882c06e6607f6 CC| |adys.wh@gmail.com