source: trunk/tools/common/kFileFormatBase.h@ 3246

Last change on this file since 3246 was 3246, checked in by bird, 25 years ago

Added simple LX support.

File size: 1.7 KB
Line 
1/* $Id: kFileFormatBase.h,v 1.2 2000-03-27 10:18:40 bird Exp $
2 *
3 * kFileFormatBase - Base class for kFile<format> classes.
4 *
5 * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11#ifndef _kFileFormat_h_
12#define _kFileFormat_h_
13
14/******************************************************************************
15* Defined Constants *
16******************************************************************************/
17#define MAXEXPORTNAME 256
18#define ORD_START_INTERNAL_FUNCTIONS 1200
19
20
21/******************************************************************************
22* Structures and Typedefs *
23******************************************************************************/
24#pragma pack(4)
25
26/**
27 * ExportEntry used by the findFirstExport/findNextExport functions
28 */
29typedef struct _ExportEntry
30{
31 unsigned long ulOrdinal;
32 char achName[MAXEXPORTNAME];
33 char achIntName[MAXEXPORTNAME]; /* not used by PEFile */
34 /* internal - do not use! */
35 void *pv;
36} EXPORTENTRY, *PEXPORTENTRY;
37
38
39/**
40 * Base class for file formats.
41 * @author knut st. osmundsen
42 */
43class kFileFormatBase
44{
45public:
46 virtual BOOL queryModuleName(char *pszBuffer) = 0;
47 virtual BOOL findFirstExport(PEXPORTENTRY pExport) = 0;
48 virtual BOOL findNextExport(PEXPORTENTRY pExport) = 0;
49 virtual BOOL isDef() const { return FALSE;}
50 virtual BOOL isPe() const { return FALSE;}
51 virtual BOOL isLx() const { return FALSE;}
52
53 static void * readfile(const char *pszFilename);
54};
55
56#pragma pack()
57
58#endif
Note: See TracBrowser for help on using the repository browser.