Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

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

Closed
Dobby233Liu opened this issue Sep 1, 2023 · 2 comments
Closed

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

Dobby233Liu opened this issue Sep 1, 2023 · 2 comments

Comments

@Dobby233Liu
Copy link
Member

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
Copy link
Member Author

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
Copy link
Member Author

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

This has been fixed in the 0.7 release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant