Ignore:
Timestamp:
Jul 17, 2000, 12:43:41 AM (25 years ago)
Author:
bird
Message:

Checkin of current code in the Grace brance for backup purpose.

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:06 bird Exp $
     1/* $Id: ModuleBase.cpp,v 1.3.4.1 2000-07-16 22:43:33 bird Exp $
    22 *
    33 * ModuleBase - Implementetation.
     
    1212*   Defined Constants And Macros                                               *
    1313*******************************************************************************/
    14 #define INCL_DOSERRORS                      /* DOS Error codes. */
     14#define INCL_DOSERRORS                  /* DOS Error codes. */
    1515#ifdef RING0
    16     #define INCL_NOAPI                      /* RING0: No apis. */
     16    #define INCL_NOAPI                  /* RING0: No apis. */
    1717#else /*RING3*/
    18     #define INCL_DOSFILEMGR                 /* RING3: DOS File api. */
     18    #define INCL_DOSFILEMGR             /* RING3: DOS File api. */
    1919#endif
    2020
     
    2323*   Header Files                                                               *
    2424*******************************************************************************/
    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, ++. */
    3637
    3738
     
    159160}
    160161
     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 */
     187ULONG  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}
    161200
    162201
     
    273312        rc = DosRead(hFile, pvBuffer, cbToRead, &cbRead);
    274313    else
    275         printErr(("DosSetFilePtr(hfile, %#8x(%d),..) failed with rc = %d.",
     314        printErr(("DosSetFilePtr(hfile, %#8x(%d),..) failed with rc = %d.\n",
    276315                  ulOffset, ulOffset, rc));
    277316
Note: See TracChangeset for help on using the changeset viewer.