sat23 598711bbe8 内存加载DLL项目升级到VC9.0 | 2 years ago | |
---|---|---|
.. | ||
doc | 2 years ago | |
example | 2 years ago | |
tests | 2 years ago | |
.gitignore | 2 years ago | |
.travis.yml | 2 years ago | |
CMakeLists.txt | 2 years ago | |
LICENSE.txt | 2 years ago | |
Makefile | 2 years ago | |
MemoryModule.c | 2 years ago | |
MemoryModule.h | 2 years ago | |
appveyor.yml | 2 years ago | |
readme.md | 2 years ago | |
stdint.h | 2 years ago |
The default windows API functions to load external libraries into a program
(LoadLibrary
, LoadLibraryEx
) only work with files on the filesystem. It's
therefore impossible to load a DLL from memory.
But sometimes, you need exactly this functionality (e.g. you don't want to distribute a lot of files or want to make disassembling harder). Common workarounds for this problems are to write the DLL into a temporary file first and import it from there. When the program terminates, the temporary file gets deleted.
MemoryModule
is a library that can be used to load a DLL completely from
memory - without storing on the disk first.
See doc/readme.txt
for more informations about the format of a DLL file and
a tutorial how they can be loaded directly.