Changeset 4164 for trunk/src/win32k/ldr/ModuleBase.cpp
- Timestamp:
- Sep 2, 2000, 11:08:23 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/ldr/ModuleBase.cpp
r2926 r4164 1 /* $Id: ModuleBase.cpp,v 1. 3 2000-02-27 02:17:06 bird Exp $1 /* $Id: ModuleBase.cpp,v 1.4 2000-09-02 21:08:06 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 "devSegDf.h" /* Win32k segment definitions. */ 28 #include "malloc.h" /* Win32k malloc. Not C library! */ 29 30 #include <string.h> /* C library string.h. */ 31 #include <stdarg.h> /* C library stdarg.h. */ 32 33 #include "vprintf.h" /* win32k printf and vprintf. Not C library! */ 34 #include "dev32.h" /* 32-Bit part of the device driver. (SSToDS) */ 35 #include "OS2Krnl.h" /* kernel structs. (SFN) */ 36 #include "ldrCalls.h" /* ldrOpenPath and ldrlv_t. */ 37 #include "modulebase.h" /* ModuleBase class definitions, ++. */ 36 38 37 39 … … 159 161 } 160 162 163 164 /** 165 * openPath - opens file eventually searching loader specific paths. 166 * 167 * This base implementation simply calls ldrOpenPath. 168 * This method is only called for DLLs. DosLoadModule and Imports. 169 * 170 * @returns OS2 return code. 171 * pLdrLv->lv_sfn is set to filename handle. 172 * @param pachFilename Pointer to filename. Not zero terminated! 173 * @param cchFilename Filename length. 174 * @param pLdrLv Loader local variables? (Struct from KERNEL.SDF) 175 * @param pful Pointer to flags which are passed on to ldrOpen. 176 * @sketch 177 * This is roughly what the original ldrOpenPath does: 178 * if !CLASS_GLOBAL or miniifs then 179 * ldrOpen(pachModName) 180 * else 181 * loop until no more libpath elements 182 * get next libpath element and add it to the modname. 183 * try open the modname 184 * if successfull then break the loop. 185 * endloop 186 * endif 187 */ 188 ULONG ModuleBase::openPath(PCHAR pachFilename, USHORT cchFilename, ldrlv_t *pLdrLv, PULONG pful) /* (ldrOpenPath) */ 189 { 190 #ifdef RING0 191 printf("ModuleBase::openPath:\n"); 192 return ldrOpenPath(pachFilename, cchFilename, pLdrLv, pful); 193 #else 194 NOREF(pachFilename); 195 NOREF(cchFilename); 196 NOREF(pLdrLv); 197 NOREF(pful); 198 return ERROR_NOT_SUPPORTED; 199 #endif 200 } 161 201 162 202 … … 232 272 233 273 /** 274 * Gets the fullpath filename. 275 * @returns Const ("Readonly") pointer to the filename. 276 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 277 */ 278 PCSZ ModuleBase::getFilename() 279 { 280 return pszFilename; 281 } 282 283 284 /** 285 * Gets the modulename. 286 * @returns Const ("Readonly") pointer to the module name. 287 * @author knut st. osmundsen (knut.stange.osmundsen@pmsc.no) 288 * @remark Modulename is filename without path and extention. 289 */ 290 PCSZ ModuleBase::getModuleName() 291 { 292 return pszModuleName; 293 } 294 295 296 /** 234 297 * Output function for Modules. 235 298 * @param pszFormat Pointer to format string. … … 273 336 rc = DosRead(hFile, pvBuffer, cbToRead, &cbRead); 274 337 else 275 printErr(("DosSetFilePtr(hfile, %#8x(%d),..) failed with rc = %d. ",338 printErr(("DosSetFilePtr(hfile, %#8x(%d),..) failed with rc = %d.\n", 276 339 ulOffset, ulOffset, rc)); 277 340
Note:
See TracChangeset
for help on using the changeset viewer.