From 08a59f29223e3b0bc930b211a3b6b26223288838 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Sat, 7 Nov 2020 21:09:12 +0100 Subject: [PATCH] Fix loading of DLLs that export all functions by ordinal See-also: https://github.com/fancycode/MemoryModule/pull/96 Signed-off-by: Simon Rozman --- MemoryModule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MemoryModule.c b/MemoryModule.c index f4cf586..7af164e 100644 --- a/MemoryModule.c +++ b/MemoryModule.c @@ -835,7 +835,7 @@ FARPROC MemoryGetProcAddress(HMEMORYMODULE mod, LPCSTR name) } exports = (PIMAGE_EXPORT_DIRECTORY) (codeBase + directory->VirtualAddress); - if (exports->NumberOfNames == 0 || exports->NumberOfFunctions == 0) { + if (exports->NumberOfFunctions == 0) { // DLL doesn't export anything SetLastError(ERROR_PROC_NOT_FOUND); return NULL;