Changeset 1812 for trunk/include/winimagepeldr.h
- Timestamp:
- Nov 22, 1999, 9:36:53 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/winimagepeldr.h
r1706 r1812 1 /* $Id: winimagepeldr.h,v 1. 4 1999-11-11 19:08:50sandervl Exp $ */1 /* $Id: winimagepeldr.h,v 1.5 1999-11-22 20:36:53 sandervl Exp $ */ 2 2 3 3 /* … … 14 14 15 15 #include <winimagebase.h> 16 17 #define SINGLE_PAGE 0 //commit single page 18 #define COMPLETE_SECTION 1 //commit entire section 19 #define SECTION_PAGES 2 //commit default nr of pages 20 21 #define DEFAULT_NR_PAGES 16 //default nr of pages to commit during exception 16 22 17 23 //SvL: To load a dll/exe for i.e. getting a single resource (GetVersionSize/Resource) … … 41 47 42 48 typedef struct { 43 char *rawdata;49 ULONG rawoffset; 44 50 ULONG rawsize; 45 51 ULONG virtaddr; … … 47 53 ULONG virtualsize; 48 54 ULONG type; 55 ULONG pageflags; 49 56 } Section; 50 57 … … 62 69 63 70 class Win32DllBase; 71 class Win32MemMap; 64 72 65 73 class Win32PeLdrImage : public virtual Win32ImageBase … … 74 82 virtual BOOL init(ULONG reservedMem); 75 83 84 //commits image page(s) when an access violation exception is dispatched 85 BOOL commitPage(ULONG virtAddress, BOOL fWriteAccess, int fPageCmd = SECTION_PAGES); 86 76 87 protected: 77 void StoreImportByOrd(Win32DllBase *WinDll, ULONG ordinal, ULONG impaddr);78 void StoreImportByName(Win32DllBase *WinDll, char *impname, ULONG impaddr);88 void StoreImportByOrd(Win32DllBase *WinDll, ULONG ordinal, ULONG impaddr); 89 void StoreImportByName(Win32DllBase *WinDll, char *impname, ULONG impaddr); 79 90 80 void addSection(ULONG type, char *rawdata, ULONG rawsize, ULONG virtaddress, ULONG virtsize);91 void addSection(ULONG type, ULONG rawoffset, ULONG rawsize, ULONG virtaddress, ULONG virtsize); 81 92 BOOL allocSections(ULONG reservedMem); 82 93 BOOL allocFixedMem(ULONG reservedMem); 83 94 Section *findSection(ULONG type); 84 95 Section *findSectionByAddr(ULONG addr); 96 Section *findSectionByOS2Addr(ULONG addr); 97 Section *findPreviousSectionByOS2Addr(ULONG addr); 85 98 86 BOOL storeSections(char *win32file);87 99 BOOL setMemFlags(); 88 100 BOOL setFixups(PIMAGE_BASE_RELOCATION prel); 101 BOOL setFixups(ULONG virtAddress, ULONG size); 89 102 void AddOff32Fixup(ULONG fixupaddr); 90 103 void AddOff16Fixup(ULONG fixupaddr, BOOL fHighFixup); … … 110 123 111 124 ULONG loadType; 112 HANDLE fImgMapping;113 125 126 HFILE hFile; 127 128 PIMAGE_BASE_RELOCATION pFixups; 129 130 Win32MemMap *memmap; 114 131 private: 115 132 };
Note:
See TracChangeset
for help on using the changeset viewer.