Changeset 1274 for trunk/include/winimagepe2lx.h
- Timestamp:
- Oct 14, 1999, 3:39:13 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/winimagepe2lx.h
r953 r1274 1 /* $Id: winimagepe2lx.h,v 1. 1 1999-09-15 23:29:37 sandervlExp $ */1 /* $Id: winimagepe2lx.h,v 1.2 1999-10-14 01:39:13 bird Exp $ */ 2 2 3 3 /* … … 5 5 * 6 6 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl) 7 * 7 * Copyright 1999 knut st. osmundsen (knut.stange.osmundsen@pmsc.no) 8 8 * 9 9 * Project Odin Software License can be found in LICENSE.TXT … … 15 15 #include <winimagebase.h> 16 16 17 #define NO_NAMETABLE 0x7777777718 #define NO_LOOKUPTABLE 0x88888819 #define GET_CONSOLE(a) (a >> 24)20 #define SET_CONSOLE(a) (a << 24)21 17 22 #define RESID_CONVERTEDNAMES 63*1024 18 /** 19 * Section struct - used to translate RVAs to pointers. 20 */ 21 typedef struct _Section 22 { 23 ULONG ulRVA; /* RVA of section. If not a PE section ~0UL. */ 24 ULONG cbVirtual; /* Virtual size (the larger of the physical and virtual) of the section. */ 25 ULONG ulAddress; /* Current load address of the section. */ 26 } SECTION, *PSECTION; 23 27 24 #pragma pack(1)25 typedef struct {26 int id;27 char name[1];28 } NameId;29 #pragma pack()30 28 29 30 /** 31 * Base class for Pe2lx (and Win32k) dlls. There is currently no difference between 32 * Pe2Lx and Win32k images, though the image on disk is different... 33 * @shortdesc Pe2Lx and Win32k base image class. 34 * @author knut st. osmundsen, Sander van Leeuwen 35 * @approval - 36 */ 31 37 class Win32Pe2LxImage : public virtual Win32ImageBase 32 38 { 33 39 public: 34 Win32Pe2LxImage(HINSTANCE hinstance, int NameTableId, int Win32TableId); 35 virtual ~Win32Pe2LxImage(); 40 /** @cat constructor and destructor */ 41 Win32Pe2LxImage(HINSTANCE hinstance, BOOL fWin32k) throw(ULONG); 42 virtual ~Win32Pe2LxImage(); 36 43 37 virtual HRSRC findResourceA(LPCSTR lpszName, LPSTR lpszType, ULONG lang = LANG_GETFIRST); 38 virtual ULONG getResourceSizeA(LPCSTR lpszName, LPSTR lpszType, ULONG lang = LANG_GETFIRST); 39 40 void setVersionId(int id) { VersionId = id; }; 41 42 virtual ULONG getVersionSize(); 43 virtual BOOL getVersionStruct(char *verstruct, ULONG bufLength); 44 private: 45 /** @cat constructor helpers */ 46 ULONG getSections(); 47 ULONG setSectionRVAs(); 48 VOID cleanup(); 44 49 45 50 protected: 46 int getWin32ResourceId(int id); 47 int convertNameId(char *lpszName); 51 /** @cat RVA -> pointer */ 52 /* this should be moved to winimagebase some day... */ 53 PVOID getPointerFromRVA(ULONG ulRVA); 48 54 49 int getVersionId() { return VersionId; }; 55 PSECTION paSections; /* Used by getPointerFromRVA and created by getSections and 56 * setSectionRVAs. */ 57 WORD cSections; /* Count of entires in the section array (paSection) */ 50 58 51 int NameTableId; 52 int Win32TableId; 53 int VersionId; 59 /** @cat Misc */ 60 PIMAGE_NT_HEADERS pNtHdrs; /* Pointer to NT headers. */ 61 BOOL fWin32k; /* flag which indicates wether this is a Win32k loaded 62 * module (TRUE) or and Pe2Lx module (FALSE). */ 63 }; 54 64 55 ULONG *Win32Table;56 NameId *NameTable;57 58 private:59 };60 65 61 66 #endif //__WINIMAGEPE2LX_H__
Note:
See TracChangeset
for help on using the changeset viewer.