Changeset 5531 for trunk/tools/common/kInterfaces.h
- Timestamp:
- Apr 17, 2001, 2:26:28 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/common/kInterfaces.h
r4751 r5531 1 /* $Id: kInterfaces.h,v 1. 1 2000-12-04 08:49:00bird Exp $1 /* $Id: kInterfaces.h,v 1.2 2001-04-17 00:26:12 bird Exp $ 2 2 * 3 3 * This headerfile contains interfaces for the common tools classes. … … 12 12 #ifndef _kInterfaces_h_ 13 13 #define _kInterfaces_h_ 14 15 16 class kPageI; 17 class kExportI; 18 class kExportEntry; 19 class kModuleI; 20 14 21 15 22 /** … … 31 38 * @param ulAddress Page address. This will be page aligned. 32 39 */ 33 virtual BOOL getPage(char *pachPage, ULONG ulAddress) = 0;40 virtual BOOL pageGet(char *pachPage, ULONG ulAddress) = 0; 34 41 35 42 /** … … 42 49 * @remark Object = Section. 43 50 */ 44 virtual BOOL getPage(char *pachPage, int iObject, int offObject) = 0;51 virtual BOOL pageGet(char *pachPage, int iObject, int offObject) = 0; 45 52 46 53 /** … … 51 58 * @param ulAddress Page address. This will be page aligned. 52 59 */ 53 virtual BOOL p utPage(const char *pachPage, ULONG ulAddress) = 0;60 virtual BOOL pagePut(const char *pachPage, ULONG ulAddress) = 0; 54 61 55 62 /** … … 61 68 * @param offObject Offset into the object. 62 69 */ 63 virtual BOOL p utPage(const char *pachPage, int iObject, int offObject) = 0;70 virtual BOOL pagePut(const char *pachPage, int iObject, int offObject) = 0; 64 71 65 72 /** … … 67 74 * @returns Pagesize in bytes. 68 75 */ 69 virtual int getPageSize() = 0; 76 virtual int pageGetPageSize() = 0; 77 }; 78 79 80 /** 81 * ExportEntry used by the findFirstExport/findNextExport functions 82 */ 83 class kExportEntry 84 { 85 #define MAXEXPORTNAME 256 86 public: 87 unsigned long ulOrdinal; /* Ordinal of export. 0 if invalid. */ 88 char achName[MAXEXPORTNAME]; /* Public or exported name. */ 89 char achIntName[MAXEXPORTNAME]; /* Optional. not used by PEFile */ 90 91 unsigned long ulOffset; /* Offset. -1 if invalid. */ 92 unsigned long iObject; /* Object number. -1 if invalid. */ 93 unsigned long ulAddress; /* Address of symbol. -1 if invalid. */ 94 95 public: 96 /** @cat Internal use - don't mess! */ 97 void * pv; /* Internal pointer. */ 98 }; 99 100 /** 101 * Interface class (ie. virtual) which defines the interface for executables 102 * (objects and libraries to perhaps) files used to enumerate exports and 103 * public exported names. 104 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 105 */ 106 class kExportI 107 { 108 public: 109 /** @cat Export enumeration methods. */ 110 111 /** 112 * Find the first export/public name. 113 * @returns Success indicator. 114 * @param pExport Communication area. 115 */ 116 virtual BOOL exportFindFirst(kExportEntry * pExport) = 0; 117 118 /** 119 * Find the next export/public name. 120 * @returns Success indicator. 121 * FALSE when no more exports (exportFindClose has been processed then). 122 * @param pExport Communication area which has been successfully 123 * processed by findFirstExport. 124 */ 125 virtual BOOL exportFindNext(kExportEntry * pExport) = 0; 126 127 /** 128 * Frees resources associated with the communicatin area. 129 * It's not necessary to call this when exportFindNext has return FALSE. 130 * @param pExport Communication area which has been successfully 131 * processed by findFirstExport. 132 */ 133 virtual void exportFindClose(kExportEntry * pExport) = 0; 134 135 136 /** @cat Export Search methods */ 137 138 /** 139 * Lookup information on a spesific export given by ordinal number. 140 * @returns Success indicator. 141 * @param pExport Communication area containing export information 142 * on successful return. 143 */ 144 virtual BOOL exportLookup(unsigned long ulOrdinal, kExportEntry *pExport) = 0; 145 146 /** 147 * Lookup information on a spesific export given by name. 148 * @returns Success indicator. 149 * @param pExport Communication area containing export information 150 * on successful return. 151 */ 152 virtual BOOL exportLookup(const char * pszName, kExportEntry *pExport) = 0; 153 }; 154 155 156 /** 157 * Interface class (ie. virtual) which defines the interface for executables 158 * (objects and libraries to perhaps) files used to enumerate exports and 159 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 160 */ 161 class kModuleI 162 { 163 public: 164 /** @cat Module information methods. */ 165 virtual BOOL moduleGetName(char *pszBuffer, int cbBuffer = 260) = 0; 166 }; 167 168 169 /** 170 * Interface class (ie. virtual) which defines the interface for 171 * executables files. 172 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 173 */ 174 class kExecutableI : public kModuleI, public kExportI 175 { 176 public: 177 /** @cat Executable information methods. */ 178 #if 0 179 virtual BOOL execIsDLL(void) = 0; 180 virtual BOOL execIsProgram(void) = 0; 181 virtual BOOL execIsDriver(void) = 0; 182 #endif 70 183 }; 71 184
Note:
See TracChangeset
for help on using the changeset viewer.