windows/memimporter: use MyLoadLibrary during imports

This commit is contained in:
Oleksii Shevchuk 2019-09-23 18:13:59 +03:00
parent eb4c6590e3
commit d9c25c786b
1 changed files with 4 additions and 0 deletions

View File

@ -211,6 +211,10 @@ HMODULE MyGetModuleHandle(LPCSTR name)
HMODULE MyLoadLibrary(LPCSTR name, void *bytes, void *dllmainArg)
{
HMODULE hLoadedModule = MyGetModuleHandle(name);
if (hLoadedModule)
return hLoadedModule;
if (bytes) {
HCUSTOMMODULE mod = MemoryLoadLibraryEx(bytes,
_LoadLibrary,