rdbo / libmem

Advanced Game Hacking Library for C, Modern C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External) (Assembler/Disassembler)
GNU Affero General Public License v3.0
738 stars 90 forks source link

Test `LM_EnumSymbols` for external processes #203

Closed rdbo closed 1 month ago

rdbo commented 4 months ago

There is a chance it might fail on windows due to the way it is currently implemented (loading the module in the current process) for EXE files.

rdbo commented 1 month ago

It works but might cause issues later due to using the deprecated DONT_RESOLVE_DLL_REFERENCES From:

DONT_RESOLVE_DLL_REFERENCES 0x00000001

If this value is used, and the executable module is a DLL, the system does not call [DllMain](https://learn.microsoft.com/en-us/windows/desktop/Dlls/dllmain) for process and thread initialization and termination. Also, the system does not load additional executable modules that are referenced by the specified module.

Note  Do not use this value; it is provided only for backward compatibility. If you are planning to access only data or resources in the DLL, use LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE or LOAD_LIBRARY_AS_IMAGE_RESOURCE or both. Otherwise, load the library as a DLL or executable module using the [LoadLibrary](https://learn.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibrarya) function.

It tells us to not use this value and use those other ones instead, but the other ones don't work...