6 if (
m_PE == NULL)
return NULL;
15 if (
m_PE == NULL)
return 0;
17 const bufsize_t size =
sizeof(IMAGE_DATA_DIRECTORY) * count;
23 if (
m_PE == NULL)
return 0;
25 if (!optHdr)
return 0;
29 if (count > pe::DIR_ENTRIES_COUNT) {
30 count = pe::DIR_ENTRIES_COUNT;
41 IMAGE_DATA_DIRECTORY* dataDir = (IMAGE_DATA_DIRECTORY*)
getPtr();
42 if (dataDir == NULL)
return NULL;
46 return (
void*)(&dataDir[fieldId].VirtualAddress);
48 return (
void*)(&dataDir[fieldId].Size);
50 return (
void*)(&dataDir[fieldId].VirtualAddress);
57 IMAGE_DATA_DIRECTORY* dir = (IMAGE_DATA_DIRECTORY*)
getPtr();
58 if (dir == NULL)
return 0;
60 IMAGE_DATA_DIRECTORY record = dir[fieldId];
64 return sizeof(record.VirtualAddress);
66 return sizeof(record.Size);
68 return sizeof(record.VirtualAddress) +
sizeof(record.Size);
74 case pe::DIR_EXPORT:
return "Export Directory";
75 case pe::DIR_IMPORT:
return "Import Directory";
76 case pe::DIR_RESOURCE :
return "Resource Directory";
77 case pe::DIR_EXCEPTION:
return "Exception Directory";
78 case pe::DIR_SECURITY:
return "Security Directory";
79 case pe::DIR_BASERELOC:
return "Base Relocation Table";
80 case pe::DIR_DEBUG :
return "Debug Directory";
81 case pe::DIR_ARCHITECTURE:
return "Architecture Specific Data";
82 case pe::DIR_GLOBALPTR :
return "RVA of GlobalPtr";
83 case pe::DIR_TLS:
return "TLS Directory";
84 case pe::DIR_LOAD_CONFIG:
return "Load Configuration Directory";
85 case pe::DIR_BOUND_IMPORT:
return "Bound Import Directory";
86 case pe::DIR_IAT:
return "Import Address Table";
87 case pe::DIR_DELAY_IMPORT:
return "Delay Load Import Descriptors";
88 case pe::DIR_COM_DESCRIPTOR :
return ".NET header";
virtual QString getFieldName(size_t fieldId)
virtual bufsize_t getFieldSize(size_t fieldId, size_t subField)
virtual Executable::addr_type containsAddrType(size_t fieldId, size_t subField=FIELD_NONE)
virtual bufsize_t getSize()
virtual void * getFieldPtr(size_t fieldId, size_t subField)
virtual uint64_t getNumValue(size_t fieldId, size_t subField, bool *isOk)
virtual ExeElementWrapper * getWrapper(size_t wrapperId)
BYTE * getContentAt(offset_t offset, bufsize_t size, bool allowExceptions=false)
offset_t peDataDirOffset()