Changeset 3834 for branches/GRACE/src/win32k/ldr/ModuleBase.cpp
- Timestamp:
- Jul 17, 2000, 12:43:41 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GRACE/src/win32k/ldr/ModuleBase.cpp
r2926 r3834 1 /* $Id: ModuleBase.cpp,v 1.3 2000-02-27 02:17:06bird Exp $1 /* $Id: ModuleBase.cpp,v 1.3.4.1 2000-07-16 22:43:33 bird Exp $ 2 2 * 3 3 * ModuleBase - Implementetation. … … 12 12 * Defined Constants And Macros * 13 13 *******************************************************************************/ 14 #define INCL_DOSERRORS 14 #define INCL_DOSERRORS /* DOS Error codes. */ 15 15 #ifdef RING0 16 #define INCL_NOAPI 16 #define INCL_NOAPI /* RING0: No apis. */ 17 17 #else /*RING3*/ 18 #define INCL_DOSFILEMGR 18 #define INCL_DOSFILEMGR /* RING3: DOS File api. */ 19 19 #endif 20 20 … … 23 23 * Header Files * 24 24 *******************************************************************************/ 25 #include <os2.h> /* OS/2 header file. */ 26 27 #include "malloc.h" /* win32k malloc. Not C library! */ 28 29 #include <string.h> /* C library string.h. */ 30 #include <stdarg.h> /* C library stdarg.h. */ 31 32 #include "vprintf.h" /* win32k printf and vprintf. Not C library! */ 33 #include "dev32.h" /* 32-Bit part of the device driver. (SSToDS) */ 34 #include "OS2Krnl.h" /* kernel structs. (SFN) */ 35 #include "modulebase.h" /* ModuleBase class definitions, ++. */ 25 #include <os2.h> /* OS/2 header file. */ 26 27 #include "malloc.h" /* win32k malloc. Not C library! */ 28 29 #include <string.h> /* C library string.h. */ 30 #include <stdarg.h> /* C library stdarg.h. */ 31 32 #include "vprintf.h" /* win32k printf and vprintf. Not C library! */ 33 #include "dev32.h" /* 32-Bit part of the device driver. (SSToDS) */ 34 #include "OS2Krnl.h" /* kernel structs. (SFN) */ 35 #include "ldrCalls.h" /* ldrOpenPath and ldrlv_t. */ 36 #include "modulebase.h" /* ModuleBase class definitions, ++. */ 36 37 37 38 … … 159 160 } 160 161 162 163 /** 164 * openPath - opens file eventually searching loader specific paths. 165 * 166 * This base implementation simply calls ldrOpenPath. 167 * This method is only called for DLLs. DosLoadModule and Imports. 168 * 169 * @returns OS2 return code. 170 * pLdrLv->lv_sfn is set to filename handle. 171 * @param pachModname Pointer to modulename. Not zero terminated! 172 * @param cchModname Modulename length. 173 * @param pLdrLv Loader local variables? (Struct from KERNEL.SDF) 174 * @param pfl Pointer to flags which are passed on to ldrOpen. 175 * @sketch 176 * This is roughly what the original ldrOpenPath does: 177 * if !CLASS_GLOBAL or miniifs then 178 * ldrOpen(pachModName) 179 * else 180 * loop until no more libpath elements 181 * get next libpath element and add it to the modname. 182 * try open the modname 183 * if successfull then break the loop. 184 * endloop 185 * endif 186 */ 187 ULONG ModuleBase::openPath(PCHAR pachModname, USHORT cchModname, ldrlv_t *pLdrLv, PULONG pfl) /* (ldrOpenPath) */ 188 { 189 #ifdef RING0 190 printf("ModuleBase::openPath:\n"); 191 return ldrOpenPath(pachModname, cchModname, pLdrLv, pfl); 192 #else 193 NOREF(pachModname); 194 NOREF(cchModname); 195 NOREF(pLdrLv); 196 NOREF(pfl); 197 return ERROR_NOT_SUPPORTED; 198 #endif 199 } 161 200 162 201 … … 273 312 rc = DosRead(hFile, pvBuffer, cbToRead, &cbRead); 274 313 else 275 printErr(("DosSetFilePtr(hfile, %#8x(%d),..) failed with rc = %d. ",314 printErr(("DosSetFilePtr(hfile, %#8x(%d),..) failed with rc = %d.\n", 276 315 ulOffset, ulOffset, rc)); 277 316
Note:
See TracChangeset
for help on using the changeset viewer.