-
-
[求助][求助]Windows10 64位系统后去kernel32.dll内函数失败
-
-
[求助][求助]Windows10 64位系统后去kernel32.dll内函数失败
写了一段获取kernel32.dll输出函数的代码,但是在Win10 64位系统下内存溢出,在Win7和Win8 64位系统下正常,不晓得哪里出了问题!求大神们指点...
HMODULE a;
int error;
error = GetLastError();
a = GetModuleHandle(L"kernel32.dll");
error = GetLastError();
PIMAGE_DOS_HEADER pimDH = (PIMAGE_DOS_HEADER)a;
PIMAGE_NT_HEADERS pimNH = (PIMAGE_NT_HEADERS)((char*)a+pimDH->e_lfanew);
PIMAGE_EXPORT_DIRECTORY pimED = (PIMAGE_EXPORT_DIRECTORY)
((DWORD)a+pimNH->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
DWORD pExportSize = pimNH->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size;
DWORD NumFun = 0;
NumFun = pimED->NumberOfFunctions;
NumFun = pimED->NumberOfFunctions;在Win10 上内存溢出了...
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课