LoadLibrary和GetProcAddress获得API的地址

#include <windows.h>
#include <stdio.h>
typedef void (*MYPROC)(LPTSTR);
int main()
{    
        HINSTANCE LibHandle;
        MYPROC ProcAdd;
          LibHandle = LoadLibrary("user32");
        printf("user32 LibHandle = //x%x\n", LibHandle);
        ProcAdd=(MYPROC)GetProcAddress(LibHandle,"MessageBoxA");    
        printf("MessageBoxA = //x%x\n", ProcAdd);

    
        return 0;
}

用于尝试查找API

posted @ 2012-10-26 09:38  r3call  阅读(5513)  评论(0编辑  收藏  举报