学习笔记 2 打印 KERNEL32.DLL 导出函数,验证出了 WIN7 系统废弃了 LoadLibraryA LoadLibraryw
现在WIN7 动态加载DLL 使用的函数是 LoadLibraryExA LoadLibraryExW 以后大家编程应该知道loadlibrary为什么会失败了吧程序代码:
#include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { unsigned int base; int *str; unsigned int icount; unsigned int count=0; //HANDLE a; //a=::LoadLibrary(TEXT("kernel32.dll")); _asm{ mov eax,fs:[0x30] mov eax,[eax+0x0c] mov eax,[eax+0x1c] mov eax,[eax] mov eax,[eax+08h] mov ebx,eax mov base,eax add eax,[eax+03ch] mov eax,[eax+078h] add eax,ebx mov ecx,[eax+018h] mov icount,ecx mov eax,[eax+020h] add eax,ebx mov str,eax } while(count<icount) { printf("%s\n",(*(str+count)+base)); count++; } //*/ //printf("%x\n",a); getchar(); return 0; }