https://bugs.winehq.org/show_bug.cgi?id=51881
Bug ID: 51881 Summary: 32bit LoadLibraryEx with LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE cannot open 64bit DLL Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: loader Assignee: wine-bugs@winehq.org Reporter: info@daniel-marschall.de Distribution: ---
Following code fails on a 32 bit app which tries to edit the resources of a 64 bit DLL (in order to edit its resources):
hmod = LoadLibraryEx(FileName, 0, LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE)
GetLastError() reports code 193 (ERROR_BAD_EXE_FORMAT)
This behavior is not correct since LOAD_LIBRARY_AS_DATAFILE and LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE should only open the file as resource file and not try to load the image.
Code used here: https://github.com/danielmarschall/filter_foundry/blob/master/versioninfo_mo...
Version of WINE:
$ wine --version Wine-1.8.7 (Debian 1.8.7-2) $ uname -a Linux debian 4.9.0-14-amd64 #1 SMP Debian 4.9.240-2 (2020-10-30) x86_64 GNU/Linux