C开源代码如下:
#include <stdio.h> #include <windows.h> #include <winbase.h> typedef void (*Myproc)(LPTSTR); int main() { HINSTANCE LibHandle; Myproc ProcAdd; printf("作者:admin-神风 QQ1976604307\n"); char dllbuf[11];//char dllbuf[11]="msvcrt.dll"; char sysbuf[20];//char sysbuf[20] ="system" ; char cmdbuf[16]="command.com"; printf("请输入需要查找的dll名:"); gets(dllbuf); printf("请输入需要查找的函数名:"); gets(sysbuf); LibHandle=LoadLibrary(dllbuf); ProcAdd=(Myproc)GetProcAddress(LibHandle,sysbuf); printf("%s LibHandle = //x%x\n",dllbuf,LibHandle); printf("%s = //x%x\n",sysbuf,ProcAdd); system("pause"); return 0; }
时间: 2024-11-07 07:30:55