// 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;
}