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

BoundImportDirectory.h

00001 /* 00002 * BoundImportDirectory.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 BOUNDIMPORTDIRECTORY_H 00014 #define BOUNDIMPORTDIRECTORY_H 00015 00016 #include "PeLibAux.h" 00017 00018 namespace PeLib 00019 { 00021 00024 class BoundImportDirectory 00025 { 00026 private: 00027 std::vector<PELIB_IMAGE_BOUND_DIRECTORY> m_vIbd; 00028 00029 public: 00031 int addBoundImport(const std::string& strModuleName, dword dwTds, word dwOmn, word wWfr); 00033 int getModuleIndex(const std::string& strModuleName) const; 00035 int getNumberOfModules() const; 00037 int read(const std::string& strFileName, dword dwOffset, dword dwSize); 00039 void rebuild(std::vector<byte>& vBuffer, bool fMakeValid = true) const; 00041 void clear(); 00043 void removeBoundImport(const std::string& strModuleName); 00045 unsigned int size() const; 00047 int write(const std::string& strFilename, dword dwOffset, bool fMakeValid = true) const; 00048 00050 dword getTimeDateStamp(dword dwBidnr) const; 00052 word getOffsetModuleName(dword dwBidnr) const; 00054 word getNumberOfModuleForwarderRefs(dword dwBidnr) const; 00056 std::string getModuleName(dword dwBidnr) const; 00057 00059 void setTimeDateStamp(dword dwBidnr, dword dwTds); 00061 void setOffsetModuleName(dword dwBidnr, word wOmn); 00063 void setNumberOfModuleForwarderRefs(dword dwBidnr, word wMfr); 00065 void setModuleName(dword dwBidnr, const std::string& strModuleName); 00066 00067 dword getTimeDateStamp(dword dwBidnr, dword forwardedModule) const; 00068 word getOffsetModuleName(dword dwBidnr, dword forwardedModule) const; 00069 word getNumberOfModuleForwarderRefs(dword dwBidnr, dword forwardedModule) const; 00070 std::string getModuleName(dword dwBidnr, dword forwardedModule) const; 00071 00072 void setTimeDateStamp(dword dwBidnr, dword forwardedModule, dword dwTds); 00073 void setOffsetModuleName(dword dwBidnr, dword forwardedModule, word wOmn); 00074 void setNumberOfModuleForwarderRefs(dword dwBidnr, dword forwardedModule, word wMfr); 00075 void setModuleName(dword dwBidnr, dword forwardedModule, const std::string& strModuleName); 00076 00077 word calcNumberOfModuleForwarderRefs(dword dwBidnr) const; 00078 void addForwardedModule(dword dwBidnr, const std::string& name, dword timeStamp = 0, word offsetModuleName = 0, word forwardedModules = 0); 00079 void removeForwardedModule(dword dwBidnr, word forwardedModule); 00080 }; 00081 } 00082 00083 00084 #endif

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