Changeset 2501 for trunk/src/win32k/pe2lx/pe2lx.cpp
- Timestamp:
- Jan 22, 2000, 7:21:03 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/pe2lx/pe2lx.cpp
r2005 r2501 1 /* $Id: pe2lx.cpp,v 1.1 4 1999-12-07 08:28:42bird Exp $1 /* $Id: pe2lx.cpp,v 1.15 2000-01-22 18:21:03 bird Exp $ 2 2 * 3 3 * Pe2Lx class implementation. Ring 0 and Ring 3 … … 37 37 #define CB2PAGES_SHIFT 12 /* count of bytes to count of pages. shift right value. Note. ALIGN!*/ 38 38 39 40 /*41 * useful macros.42 */43 #define NOREF(a) (a=a) /* Not referenced parameter warning fix. */44 #define ALIGN(a, alignment) (((a) + (alignment - 1UL)) & ~(alignment - 1UL))45 /* aligns something, a, up to nearest alignment boundrary-46 * Note: Aligment must be a 2**n number. */47 39 48 40 /* … … 85 77 * ReadAt: Reads from a file, hFile, at a given offset, ulOffset, into a buffer, pvBuffer, 86 78 * an amount of bytes, cbToRead. 87 * RING0: Map this to _ldrRead with 0UL as flFlags.79 * RING0: Map this to ldrRead with 0UL as flFlags. 88 80 * RING3: Implementes this function as a static function, ReadAt. 89 81 * ReadAtF: Same as ReadAt but two extra parameters; an additional flag and a pointer to an MTE. 90 82 * Used in the read method. 91 * RING0: Map directly to _ldrRead.83 * RING0: Map directly to ldrRead. 92 84 * RING3: Map to ReadAt, ignoring the two extra parameters. 93 85 */ 94 86 #ifdef RING0 95 87 #define ReadAt(hFile, ulOffset, pvBuffer, cbToRead) \ 96 _ldrRead(hFile, ulOffset, pvBuffer, 0UL, cbToRead, NULL)88 ldrRead(hFile, ulOffset, pvBuffer, 0UL, cbToRead, NULL) 97 89 #define ReadAtF(hFile, ulOffset, pvBuffer, cbToRead, flFlags, pMTE) \ 98 _ldrRead(hFile, ulOffset, pvBuffer, flFlags, cbToRead, pMTE)90 ldrRead(hFile, ulOffset, pvBuffer, flFlags, cbToRead, pMTE) 99 91 #else 100 92 #define ReadAtF(hFile, ulOffset, pvBuffer, cbToRead, flFlags, pMTE) \ … … 123 115 #include "OS2Krnl.h" /* kernel structs. (SFN) */ 124 116 #ifdef RING0 125 #include "ldrCalls.h" /* _ldr* calls. (_ldrRead) */117 #include "ldrCalls.h" /* ldr* calls. (ldrRead) */ 126 118 #endif 127 119 #include "modulebase.h" /* ModuleBase class definitions, ++. */ … … 723 715 * @param pvBuffer Pointer to buffer where data is to be put. 724 716 * @param cbToRead Bytes to be read. 725 * @param flFlag Flags which was spesified to the _ldrRead call.726 * @parma pMTE Pointer to MTE which was specified to the _ldrRead call.717 * @param flFlag Flags which was spesified to the ldrRead call. 718 * @parma pMTE Pointer to MTE which was specified to the ldrRead call. 727 719 * @return NO_ERROR if successful something else if not. 728 720 * @status completely implmented; tested. … … 1018 1010 1019 1011 1012 /** 1013 * Applies relocation fixups to a page which is being loaded. 1014 * @returns NO_ERROR on success? 1015 * error code on error? 1016 * @param pMTE Pointer Module Table Entry. 1017 * @param iObject Index into the object table. (0-based) 1018 * @param iPageTable Index into the page table. (0-based) 1019 * @param pvPage Pointer to the page which is being loaded. 1020 * @param ulPageAddress Address of page. 1021 * @param pvPTDA Pointer to Per Task Data Aera 1022 * 1023 * @sketch Find RVA. 1024 */ 1025 ULONG Pe2Lx::applyFixups(PMTE pMTE, ULONG iObject, ULONG iPageTable, PVOID pvPage, 1026 ULONG ulPageAddress, PVOID pvPTDA) 1027 { 1028 ULONG ulRVA; 1029 1030 NOREF(ulRVA); 1031 1032 NOREF(pMTE); 1033 NOREF(iObject); 1034 NOREF(iPageTable); 1035 NOREF(pvPage); 1036 NOREF(ulPageAddress); 1037 NOREF(pvPTDA); 1038 1039 return NO_ERROR; 1040 } 1041 1042 1043 1020 1044 #ifndef RING0 1021 1045 /**
Note:
See TracChangeset
for help on using the changeset viewer.