| Line |  | 
|---|
| 1 | /* | 
|---|
| 2 | * kFileFormatBase - Base class for kFile<format> classes. | 
|---|
| 3 | * | 
|---|
| 4 | * Copyright (c) 1999 knut st. osmundsen | 
|---|
| 5 | * | 
|---|
| 6 | */ | 
|---|
| 7 | #ifndef _kFileFormat_h_ | 
|---|
| 8 | #define _kFileFormat_h_ | 
|---|
| 9 |  | 
|---|
| 10 | /****************************************************************************** | 
|---|
| 11 | *   Defined Constants                                                         * | 
|---|
| 12 | ******************************************************************************/ | 
|---|
| 13 | #define MAXEXPORTNAME 256 | 
|---|
| 14 | #define ORD_START_INTERNAL_FUNCTIONS 1200 | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | /****************************************************************************** | 
|---|
| 18 | *   Structures and Typedefs                                                   * | 
|---|
| 19 | ******************************************************************************/ | 
|---|
| 20 | #pragma pack(4) | 
|---|
| 21 |  | 
|---|
| 22 | /** | 
|---|
| 23 | * ExportEntry used by the findFirstExport/findNextExport functions | 
|---|
| 24 | */ | 
|---|
| 25 | typedef struct _ExportEntry | 
|---|
| 26 | { | 
|---|
| 27 | unsigned long  ulOrdinal; | 
|---|
| 28 | char           achName[MAXEXPORTNAME]; | 
|---|
| 29 | char           achIntName[MAXEXPORTNAME]; /* not used by PEFile */ | 
|---|
| 30 | /* internal - do not use! */ | 
|---|
| 31 | void          *pv; | 
|---|
| 32 | } EXPORTENTRY, *PEXPORTENTRY; | 
|---|
| 33 |  | 
|---|
| 34 |  | 
|---|
| 35 | /** | 
|---|
| 36 | * Base class for file formats. | 
|---|
| 37 | * @author      knut st. osmundsen | 
|---|
| 38 | */ | 
|---|
| 39 | class kFileFormatBase | 
|---|
| 40 | { | 
|---|
| 41 | public: | 
|---|
| 42 | virtual BOOL  queryModuleName(char *pszBuffer) = 0; | 
|---|
| 43 | virtual BOOL  findFirstExport(PEXPORTENTRY pExport) = 0; | 
|---|
| 44 | virtual BOOL  findNextExport(PEXPORTENTRY pExport)  = 0; | 
|---|
| 45 | virtual BOOL  isDef() const { return FALSE;} | 
|---|
| 46 | virtual BOOL  isPe() const  { return FALSE;} | 
|---|
| 47 | }; | 
|---|
| 48 |  | 
|---|
| 49 | #pragma pack() | 
|---|
| 50 |  | 
|---|
| 51 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.