Skip to content

Commit 7b799dc

Browse files
author
zoand
committed
修复不能获取匿名导出函数的BUG
1 parent 0a8e1f8 commit 7b799dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MemoryModule.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,9 @@ FARPROC MemoryGetProcAddress(HMEMORYMODULE mod, LPCSTR name)
790790
}
791791

792792
exports = (PIMAGE_EXPORT_DIRECTORY) (codeBase + directory->VirtualAddress);
793-
if (exports->NumberOfNames == 0 || exports->NumberOfFunctions == 0) {
793+
//if (exports->NumberOfNames == 0 || exports->NumberOfFunctions == 0) {
794+
/*2019.12.24.zoand*/
795+
if (exports->NumberOfNames == 0 && exports->NumberOfFunctions == 0) {
794796
// DLL doesn't export anything
795797
SetLastError(ERROR_PROC_NOT_FOUND);
796798
return NULL;

0 commit comments

Comments
 (0)