获取system和LoadLibraryA函数的地址

GetLoadSysAdd.cpp

#include <windows.h>
#include <stdio.h>
typedef void (*MYPROC)(LPTSTR);
int main()

  HINSTANCE LibHandle;
  MYPROC ProcAdd;
    LibHandle = LoadLibrary("msvcrt");
  printf("msvcrt LibHandle = //x%x/n", LibHandle);
  ProcAdd=(MYPROC)GetProcAddress(LibHandle,"system"); 
  printf("system = //x%x/n", ProcAdd);

  LibHandle = LoadLibrary("kernel32");
  printf("kernel32 LibHandle = //x%x/n", LibHandle);
  ProcAdd=(MYPROC)GetProcAddress(LibHandle,"LoadLibraryA"); 
  printf("LoadLibrary = //x%x/n", ProcAdd);
  return 0;
}
 

上一篇:VS解决方案的“显示所有文件等属性”


下一篇:足彩基础知识入门(4)赛事数据库与预测平台基础概念介绍(一)