Fix loading of DLLs that export all functions by ordinal

See-also: https://github.com/fancycode/MemoryModule/pull/96
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman
2020-11-07 21:09:12 +01:00
parent 5e850c0b76
commit 08a59f2922
+1 -1
View File
@@ -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;