Changeset 4307 for trunk/src/win32k/ldr
- Timestamp:
- Sep 22, 2000, 11:22:43 AM (25 years ago)
- Location:
- trunk/src/win32k/ldr
- Files:
-
- 1 added
- 3 edited
-
ModuleBase.cpp (modified) (3 diffs)
-
calltab.asm (modified) (3 diffs)
-
myldrOpenPath.cpp (modified) (9 diffs)
-
myldrOpenPatha.asm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/ldr/ModuleBase.cpp
r4164 r4307 1 /* $Id: ModuleBase.cpp,v 1. 4 2000-09-02 21:08:06bird Exp $1 /* $Id: ModuleBase.cpp,v 1.5 2000-09-22 09:22:39 bird Exp $ 2 2 * 3 3 * ModuleBase - Implementetation. … … 174 174 * @param pLdrLv Loader local variables? (Struct from KERNEL.SDF) 175 175 * @param pful Pointer to flags which are passed on to ldrOpen. 176 * @param lLibPath New parameter in build 14053(/8266?) 177 * ldrGetMte calls with 1 178 * ldrOpenNewExe calls with 3 179 * This is compared to the initial libpath index. 180 * The libpath index is: 181 * BEGINLIBPATH 1 182 * LIBPATH 2 183 * ENDLIBPATH 3 184 * The initial libpath index is either 1 or 2. 185 * Currently we'll ignore it. (I don't know why ldrGetMte calls ldrOpenPath...) 176 186 * @sketch 177 187 * This is roughly what the original ldrOpenPath does: 188 * Save pTCBCur->TCBFailErr. 178 189 * if !CLASS_GLOBAL or miniifs then 179 * ldrOpen(pach ModName)190 * ldrOpen(pachFilename) 180 191 * else 192 * if beglibpath != NULL then path = 1 else path = 2 193 * if (lLibPath < path) 194 * return ERROR_FILE_NOT_FOUND; (2) 195 * Allocate buffer. 181 196 * loop until no more libpath elements 182 197 * get next libpath element and add it to the modname. … … 184 199 * if successfull then break the loop. 185 200 * endloop 201 * Free buffer. 186 202 * endif 187 */ 188 ULONG ModuleBase::openPath(PCHAR pachFilename, USHORT cchFilename, ldrlv_t *pLdrLv, PULONG pful) /* (ldrOpenPath) */ 203 * Restore pTCBCur->TCBFailErr. 204 */ 205 ULONG ModuleBase::openPath(PCHAR pachFilename, USHORT cchFilename, ldrlv_t *pLdrLv, PULONG pful, ULONG lLibPath) /* (ldrOpenPath) */ 189 206 { 190 207 #ifdef RING0 191 208 printf("ModuleBase::openPath:\n"); 192 return ldrOpenPath(pachFilename, cchFilename, pLdrLv, pful );209 return ldrOpenPath(pachFilename, cchFilename, pLdrLv, pful, lLibPath); 193 210 #else 194 211 NOREF(pachFilename); -
trunk/src/win32k/ldr/calltab.asm
r4227 r4307 1 ; $Id: calltab.asm,v 1.1 4 2000-09-08 21:34:12bird Exp $1 ; $Id: calltab.asm,v 1.15 2000-09-22 09:22:39 bird Exp $ 2 2 ; 3 3 ; callTab - Call back again table - table with entry for each function or … … 43 43 public _VMObjHandleInfo@12 44 44 public _ldrASMpMTEFromHandle@4 45 public _ ldrOpenPath@1645 public __ldrOpenPath ; exported thru assembly wrapper 46 46 public _LDRClearSem@0 47 47 public _ldrFindModule@16 … … 228 228 _ldrASMpMTEFromHandle@4 ENDP 229 229 230 ; 20 231 _ ldrOpenPath@16PROC NEAR232 db MAXSIZE_PROLOG dup(0cch) 233 _ ldrOpenPath@16ENDP230 ; 20 - exported thru assembly interface due to change in build 14053. 231 __ldrOpenPath PROC NEAR 232 db MAXSIZE_PROLOG dup(0cch) 233 __ldrOpenPath ENDP 234 234 235 235 ; 21 -
trunk/src/win32k/ldr/myldrOpenPath.cpp
r4164 r4307 1 /* $Id: myldrOpenPath.cpp,v 1. 2 2000-09-02 21:08:10 bird Exp $1 /* $Id: myldrOpenPath.cpp,v 1.3 2000-09-22 09:22:40 bird Exp $ 2 2 * 3 3 * myldrOpenPath - ldrOpenPath used to open executables we'll override … … 41 41 42 42 /** 43 * ldrOpenPath. 43 44 * myldrOpenPath - opens file eventually searching loader specific paths 44 45 * … … 49 50 * @param plv Loader local variables? (Struct from KERNEL.SDF) 50 51 * @param pful Pointer to flags which are passed on to ldrOpen. 52 * @param lLibPath New parameter in build 14053() 53 * ldrGetMte calls with 1 54 * ldrOpenNewExe calls with 3 55 * This is compared to the initial libpath index. 56 * The libpath index is: 57 * BEGINLIBPATH 1 58 * LIBPATH 2 59 * ENDLIBPATH 3 60 * The initial libpath index is either 1 or 2. 61 * Currently we'll ignore it. (I don't know why ldrGetMte calls ldrOpenPath...) 62 * 51 63 * @sketch 52 64 * This is roughly what the original ldrOpenPath does: … … 55 67 * ldrOpen(pachFilename) 56 68 * else 69 * if beglibpath != NULL then path = 1 else path = 2 70 * if (lLibPath < path) 71 * return ERROR_FILE_NOT_FOUND; (2) 72 * Allocate buffer. 57 73 * loop until no more libpath elements 58 74 * get next libpath element and add it to the modname. … … 60 76 * if successfull then break the loop. 61 77 * endloop 78 * Free buffer. 62 79 * endif 63 80 * Restore pTCBCur->TCBFailErr. … … 65 82 * 66 83 */ 67 ULONG LDRCALL myldrOpenPath( /* retd 0x10*/84 ULONG LDRCALL myldrOpenPath( /* retd 0x14 */ 68 85 PCHAR pachFilename, /* ebp + 0x08 */ 69 86 USHORT cchFilename, /* ebp + 0x0c */ 70 87 ldrlv_t * plv, /* ebp + 0x10 */ 71 PULONG pful /* ebp + 0x14 */ 88 PULONG pful, /* ebp + 0x14 */ 89 ULONG lLibPath /* ebp + 0x18 */ 72 90 ) 73 91 { … … 89 107 pachFilename, cchFilename, plv, pful 90 108 )); 91 return ldrOpenPath(pachFilename, cchFilename, plv, pful );109 return ldrOpenPath(pachFilename, cchFilename, plv, pful, lLibPath); 92 110 } 93 111 #endif … … 156 174 */ 157 175 USHORT TCBFailErr_save = tcbGetTCBFailErr(tcbGetCur()); 158 rc = pExe->Data.pModule->openPath(pachFilename, cchFilename, plv, pful );176 rc = pExe->Data.pModule->openPath(pachFilename, cchFilename, plv, pful, lLibPath); 159 177 tcbSetTCBFailErr(tcbGetCur(), TCBFailErr_save); 160 178 } 161 179 else 162 rc = ldrOpenPath(pachFilename, cchFilename, plv, pful );180 rc = ldrOpenPath(pachFilename, cchFilename, plv, pful, lLibPath); 163 181 } 164 182 else 165 rc = ldrOpenPath(pachFilename, cchFilename, plv, pful );183 rc = ldrOpenPath(pachFilename, cchFilename, plv, pful, lLibPath); 166 184 167 185 … … 176 194 177 195 196 /** 197 * Wrapper for the old (pre 14053) versions. 198 * the new parameter is set to 3. 199 */ 200 ULONG LDRCALL myldrOpenPath_old( /* retd 0x10 */ 201 PCHAR pachFilename, /* ebp + 0x08 */ 202 USHORT cchFilename, /* ebp + 0x0c */ 203 ldrlv_t * plv, /* ebp + 0x10 */ 204 PULONG pful /* ebp + 0x14 */ 205 ) 206 { 207 return myldrOpenPath(pachFilename, cchFilename, plv, pful, 3); 208 } 209 210
Note:
See TracChangeset
for help on using the changeset viewer.
