-
Notifications
You must be signed in to change notification settings - Fork 0
/
pe.h
33 lines (27 loc) · 941 Bytes
/
pe.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef PE_H
#define PE_H
#include <windows.h>
typedef IMAGE_RESOURCE_DIRECTORY pe_ResDir;
typedef IMAGE_RESOURCE_DIRECTORY_ENTRY pe_ResDirEntry;
typedef IMAGE_RESOURCE_DATA_ENTRY pe_ResDataEntry;
typedef IMAGE_DOS_HEADER pe_DosHeader;
typedef IMAGE_NT_HEADERS pe_NtHeader;
typedef IMAGE_FILE_HEADER pe_FileHeader;
typedef IMAGE_OPTIONAL_HEADER pe_OptionHeader;
typedef IMAGE_DATA_DIRECTORY pe_DataDirectroy;
typedef IMAGE_SECTION_HEADER pe_SectionHeader;
class PE
{
void* m_pData;
bool m_bIsFileAlign;
public:
PE(void* pFileData,bool bIsFileAlign=true);
pe_DosHeader* dosHeader();
pe_NtHeader* ntHeader();
pe_FileHeader* fileHeader();
pe_OptionHeader* optionHeader();
pe_DataDirectroy* dataDirectory();
pe_SectionHeader* sectionHeader();
DWORD RVAToOfs( DWORD dwRVA);
};
#endif // PE_H