Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

ComHeaderDirectory.h

00001 /* 00002 * ComHeaderDirectory.h - Part of the PeLib library. 00003 * 00004 * Copyright (c) 2004 Sebastian Porst (webmaster@the-interweb.com) 00005 * All rights reserved. 00006 * 00007 * This software is licensed under the zlib/libpng License. 00008 * For more details see http://www.opensource.org/licenses/zlib-license.php 00009 * or the license information file (license.htm) in the root directory 00010 * of PeLib. 00011 */ 00012 00013 #ifndef COMHEADERDIRECTORY_H 00014 #define COMHEADERDIRECTORY_H 00015 00016 namespace PeLib 00017 { 00019 00023 class ComHeaderDirectory 00024 { 00025 private: 00026 PELIB_IMAGE_COR20_HEADER m_ichComHeader; 00027 00028 public: 00030 int read(const std::string& strFilename, unsigned int uiOffset, unsigned int uiSize); 00032 void rebuild(std::vector<byte>& vBuffer) const; 00034 unsigned int size() const; 00036 int write(const std::string& strFilename, unsigned int dwOffset) const; 00037 00039 dword getSizeOfHeader() const; 00041 word getMajorRuntimeVersion() const; 00043 word getMinorRuntimeVersion() const; 00045 dword getMetaDataVa() const; 00047 dword getMetaDataSize() const; 00049 dword getFlags() const; 00051 dword getEntryPointToken() const; 00053 dword getResourcesVa() const; 00055 dword getResourcesSize(); 00057 dword getStrongNameSignatureVa() const; 00059 dword getStrongNameSignagureSize() const; 00061 dword getCodeManagerTableVa() const; 00063 dword getCodeManagerTableSize() const; 00065 dword getVTableFixupsVa() const; 00067 dword getVTableFixupsSize() const; 00069 dword getExportAddressTableJumpsVa() const; 00071 dword getExportAddressTableJumpsSize() const; 00073 dword getManagedNativeHeaderVa() const; 00075 dword getManagedNativeHeaderSize() const; 00076 00078 void setSizeOfHeader(dword dwValue); 00080 void setMajorRuntimeVersion(word wValue); 00082 void setMinorRuntimeVersion(word wValue); 00084 void setMetaDataVa(dword dwValue); 00086 void setMetaDataSize(dword dwValue); 00088 void setFlags(dword dwValue); 00090 void setEntryPointToken(dword dwValue); 00092 void setResourcesVa(dword dwValue); 00094 void setResourcesSize(dword dwValue); 00096 void setStrongNameSignatureVa(dword dwValue); 00098 void setStrongNameSignagureSize(dword dwValue); 00100 void setCodeManagerTableVa(dword dwValue); 00102 void setCodeManagerTableSize(dword dwValue); 00104 void setVTableFixupsVa(dword dwValue); 00106 void setVTableFixupsSize(dword dwValue); 00108 void setExportAddressTableJumpsVa(dword dwValue); 00110 void setExportAddressTableJumpsSize(dword dwValue); 00112 void setManagedNativeHeaderVa(dword dwValue); 00114 void setManagedNativeHeaderSize(dword dwValue); 00115 }; 00116 } 00117 #endif

Generated on Mon Jan 17 20:50:08 2005 for PeLib by doxygen 1.3.7