00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
#ifndef DEBUGDIRECTORY_H
00014
#define DEBUGDIRECTORY_H
00015
00016
namespace PeLib
00017 {
00019 class DebugDirectory
00020 {
00021
private:
00023 std::vector<PELIB_IMG_DEBUG_DIRECTORY>
m_vDebugInfo;
00024
00025
public:
00027
int read(
const std::string& strFilename,
unsigned int uiOffset,
unsigned int uiSize);
00029
void rebuild(std::vector<byte>& obBuffer)
const;
00031
unsigned int size() const;
00033
int write(const std::string& strFilename,
unsigned int uiOffset) const;
00034
00036
unsigned int getNumberOfEntries() const;
00037
00039
void addEntry();
00041
void removeEntry(
unsigned int uiIndex);
00042
00044 dword getCharacteristics(
unsigned int uiIndex) const;
00046 dword getTimeDateStamp(
unsigned int uiIndex) const;
00048 word getMajorVersion(
unsigned int uiIndex) const;
00050 word getMinorVersion(
unsigned int uiIndex) const;
00052 dword getType(
unsigned int uiIndex) const;
00054 dword getSizeOfData(
unsigned int uiIndex) const;
00056 dword getAddressOfRawData(
unsigned int uiIndex) const;
00058 dword getPointerToRawData(
unsigned int uiIndex) const;
00059
00061
void setCharacteristics(
unsigned int uiIndex, dword dwValue);
00063
void setTimeDateStamp(
unsigned int uiIndex, dword dwValue);
00065
void setMajorVersion(
unsigned int uiIndex, word wValue);
00067
void setMinorVersion(
unsigned int uiIndex, word wValue);
00069
void setType(
unsigned int uiIndex, dword dwValue);
00071
void setSizeOfData(
unsigned int uiIndex, dword dwValue);
00073
void setAddressOfRawData(
unsigned int uiIndex, dword dwValue);
00075
void setPointerToRawData(
unsigned int uiIndex, dword dwValue);
00076 };
00077 }
00078 #endif