d2lmirrors / anolis

Anolis is the underlying project for the XPize and Vize resource switchers for Windows XP and Vista respectivly. The codebase allows for the easy swapping around of resources within Win32 executables and other files. (just adding some missing data)
GNU General Public License v2.0
1 stars 0 forks source link

Cannot load 32-bit DLL in 64-bit process #20

Closed Dobby233Liu closed 1 year ago

Dobby233Liu commented 1 year ago

creation date = 2009-01-11T04:36:00.42-08:00

When compiled for x64, Anolis.Core.PE.PESource.Reload() throws "PE/COFF ResourceSource could not be loaded." on some files. When compiled on x86, it works ok.   Reason: you cannot load a 32-bit DLL in a 64-bit process. The app built on Any CPU target will load the 64-bit CLR. Maybe add a warning in the documentation?   Gives out win32messages like Unable to FormatMessage(193), cause: the parameter is incorrect.

Dobby233Liu commented 1 year ago

creation date = 2009-01-11T14:44:37.453-08:00

This results from when I thought I'd need to use LoadLibrary without the AsDataFile flag. By making sure the AsDataFile flag is set on x64 I can load 32-bit libraries fine. This will go in the next release. This also changes the Read Only behaviour. Thanks for the feedback, I don't think I'd have spotted it.

Dobby233Liu commented 1 year ago

closed date = 2009-01-31T06:25:31.82-08:00

This has been fixed in the 0.7 release