0
点赞
收藏
分享

微信扫一扫

获取程序入口地址


// GetExeEntryPoint.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <Windows.h>
#include <Psapi.h>
#pragma comment(lib, "Psapi.lib")
int _tmain(int argc, _TCHAR* argv[])
{
printf("GetCurrentProcess:0x%d \n", GetCurrentProcess());
printf("GetModuleHandle:0x%d \n", GetModuleHandle(NULL));

MODULEINFO moduleInfoe;
GetModuleInformation(
GetCurrentProcess(), // handle to process
GetModuleHandle(NULL), // handle to module
&moduleInfoe, // information buffer
sizeof(moduleInfoe) // size of buffer
);
printf("模块加载起始地址:0x%X 大小:0x%X(%d) 入口:0x%X \n",
moduleInfoe.lpBaseOfDll,
moduleInfoe.SizeOfImage,
moduleInfoe.SizeOfImage,
moduleInfoe.EntryPoint);


getchar();
return 0;
}

获取程序入口地址_模块基址








举报

相关推荐

0 条评论