Changeset 4052 for branches/GRACE/src


Ignore:
Timestamp:
Aug 20, 2000, 10:08:50 AM (25 years ago)
Author:
bird
Message:

Added new imports needed for the Pe2Lx openPath implementation.

Location:
branches/GRACE/src/win32k
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/dev16/probkrnl.c

    r4046 r4052  
    1 /* $Id: probkrnl.c,v 1.20.4.6 2000-08-19 14:36:53 bird Exp $
     1/* $Id: probkrnl.c,v 1.20.4.7 2000-08-20 08:08:43 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    107107    {FALSE, -1,  8, "f_FuBuff",             -1,  -1,  -1,  -1, EPT_PROCIMPORT16},  /* 16 */
    108108    {FALSE, -1, 16, "_VMObjHandleInfo",     -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 17 */
    109     {FALSE, -1, 12, "_ldrOpenPath",         -1,  -1,  -1,  -1, EPT_PROC32},        /* 18 */
    110     {FALSE, -1, 12, "_LDRClearSem",         -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 19 */
    111     {FALSE, -1, 17, "_KSEMRequestMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 20  */
    112     {FALSE, -1, 17, "_KSEMReleaseMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 21  */
    113     {FALSE, -1,  7, "_LdrSem",              -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 22 */
    114     {FALSE, -1,  9, "_TKSuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 23 */
    115     {FALSE, -1,  9, "_TKFuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 24 */
    116     {FALSE, -1, 11, "_TKFuBufLen",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 25 */
    117     {FALSE, -1, 21, "_ldrValidateMteHandle",-1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 26 */
    118     {FALSE, -1,  8, "_pTCBCur",             -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 27 */
    119     {FALSE, -1,  9, "_pPTDACur",            -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 28 */
    120     {FALSE, -1, 10, "ptda_start",           -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 29 */
    121     {FALSE, -1, 12, "ptda_environ",         -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 30 */
    122     {FALSE, -1, 11, "ptda_module",          -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 31 */
     109    {FALSE, -1, 18, "_VMPseudoHandleMap",   -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 18 */
     110    {FALSE, -1, 12, "_ldrOpenPath",         -1,  -1,  -1,  -1, EPT_PROC32},        /* 19 */
     111    {FALSE, -1, 12, "_LDRClearSem",         -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 20 */
     112    {FALSE, -1, 14, "_ldrFindModule",       -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 21 */
     113    {FALSE, -1, 17, "_KSEMRequestMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 22 */
     114    {FALSE, -1, 17, "_KSEMReleaseMutex",    -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 23 */
     115    {FALSE, -1,  7, "_LdrSem",              -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 24 */
     116    {FALSE, -1, 11, "_LDRLibPath",          -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 25 */
     117    {FALSE, -1,  9, "_TKSuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 26 */
     118    {FALSE, -1,  9, "_TKFuBuff",            -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 27 */
     119    {FALSE, -1, 11, "_TKFuBufLen",          -1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 28 */
     120    {FALSE, -1, 21, "_ldrValidateMteHandle",-1,  -1,  -1,  -1, EPT_PROCIMPORT32},  /* 29 */
     121    {FALSE, -1,  8, "_pTCBCur",             -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 30 */
     122    {FALSE, -1,  9, "_pPTDACur",            -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 31 */
     123    {FALSE, -1, 10, "ptda_start",           -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 32 */
     124    {FALSE, -1, 12, "ptda_environ",         -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 33 */
     125    {FALSE, -1, 11, "ptda_module",          -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 34 */
     126    {FALSE, -1, 18, "ptda_pBeginLIBPATH",   -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 35 */
    123127
    124128};
     
    16621666        int         i;
    16631667
    1664         printf16("/* $Id: probkrnl.c,v 1.20.4.6 2000-08-19 14:36:53 bird Exp $\n"
     1668        printf16("/* $Id: probkrnl.c,v 1.20.4.7 2000-08-20 08:08:43 bird Exp $\n"
    16651669                 "*\n"
    16661670                 "* Autogenerated kernel symbol database.\n"
  • branches/GRACE/src/win32k/include/LdrCalls.h

    r4046 r4052  
    1 /* $Id: LdrCalls.h,v 1.3.4.3 2000-08-19 14:37:09 bird Exp $
     1/* $Id: LdrCalls.h,v 1.3.4.4 2000-08-20 08:08:45 bird Exp $
    22 *
    33 * Prototypes for the loader overrided function.
     
    165165
    166166
     167/**
     168 * Finds a module if it's loaded.
     169 * @returns     NO_ERROR on success.
     170 *              OS/2 errorcode on error.
     171 * @param       pachFilename    Pointer to module filename.
     172 * @param       cchFilename     Length of modulefilename.
     173 * @param       usClass         Module class. (CLASS_*)
     174 * @param       ppMTE           Pointer to pMTE found.
     175 * @sketch
     176 */
     177ULONG LDRCALL ldrFindModule(PCHAR pachFilename, USHORT cchFilename, USHORT usClass, PPMTE ppMTE);
     178
    167179
    168180/**
    169181 * LDRClearSem - Clears the loader semaphore.
    170182 * (It does some garbage collection on release.)
    171  * @returns   NO_ERROR on sucess.
     183 * @returns   NO_ERROR on success.
    172184 *            OS/2 error on failure. (ERROR_INTERRUPT?)
    173185 */
  • branches/GRACE/src/win32k/include/OS2KVM.h

    r3834 r4052  
    1 /* $Id: OS2KVM.h,v 1.4.4.1 2000-07-16 22:43:27 bird Exp $
     1/* $Id: OS2KVM.h,v 1.4.4.2 2000-08-20 08:08:45 bird Exp $
    22 *
    33 * OS/2 kernel VM functions.
     
    105105    PUSHORT pushPTDA);
    106106
     107PMTE KRNLCALL VMPseudoHandleMap(
     108    HMTE    hMTE);
    107109#endif
  • branches/GRACE/src/win32k/include/pe2lx.h

    r3834 r4052  
    1 /* $Id: pe2lx.h,v 1.9.4.1 2000-07-16 22:43:32 bird Exp $
     1/* $Id: pe2lx.h,v 1.9.4.2 2000-08-20 08:08:45 bird Exp $
    22 *
    33 * Pe2Lx class declarations. Ring 0 and Ring 3
     
    7575    BOOL    isExe();
    7676    BOOL    isDll();
     77    static HMTE getKernel32SFN()        {   return sfnKernel32;   }
     78    static VOID setKernel32SFN(SFN sfn) {   sfnKernel32 = sfn;   }
    7779
    7880    /** @cat public Helper methods */
     
    203205
    204206    static const char *     pszOdin32Path;  /* Odin32 base path. */
     207    static SFN              sfnKernel32;    /* Odin32 Kernel32 filehandle. */
    205208};
    206209
  • branches/GRACE/src/win32k/include/probkrnl.h

    r4046 r4052  
    1 /* $Id: probkrnl.h,v 1.13.4.4 2000-08-19 14:37:10 bird Exp $
     1/* $Id: probkrnl.h,v 1.13.4.5 2000-08-20 08:08:45 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    1616*   Defined Constants And Macros                                               *
    1717*******************************************************************************/
    18 #define NBR_OF_KRNLIMPORTS      32      /* When this is changed make sure to   */
     18#define NBR_OF_KRNLIMPORTS      36      /* When this is changed make sure to   */
    1919                                        /* update the arrays in d32init.c and  */
    2020                                        /* probkrnl.c */
  • branches/GRACE/src/win32k/pe2lx/pe2lx.cpp

    r4046 r4052  
    1 /* $Id: pe2lx.cpp,v 1.18.4.3 2000-08-19 14:37:18 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.18.4.4 2000-08-20 08:08:47 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    46474647
    46484648
     4649BOOL Pe2Lx::initOdin32Path()
     4650{
     4651    APIRET rc;
     4652    PMTE   pMTE;
     4653
     4654
     4655    if (sfnKernel32 != NULLHANDLE)
     4656        return TRUE;
     4657
     4658    /*
     4659     * Try find it using ldrFindModule.
     4660     */
     4661    pMTE = NULL;
     4662    rc = ldrFindModule("KERNEL32", 8, CLASS_GLOBAL, &pMTE);
     4663    if (rc == NO_ERROR && pMTE != NULL)
     4664    {
     4665        char *psz = pMTE->mte_swapmte->smte_path;
     4666        if (psz != NULL)
     4667        {
     4668            char * pszEnd = psz + strlen(psz) - 1;
     4669            while (pszEnd > psz && *pszEnd != '\\' && *pszEnd != '/' && *pszEnd != ':')
     4670                pszEnd--;
     4671            pszEnd--;
     4672            while (pszEnd > psz && *pszEnd != '\\' && *pszEnd != '/' && *pszEnd != ':')
     4673                pszEnd--;
     4674            if (pszEnd > psz)
     4675            {
     4676                char * pszPath = (char*)malloc(pszEnd - psz);
     4677                memcpy(pszPath, psz, pszEnd - psz);
     4678                pszPath[pszEnd - psz] = '\0';
     4679
     4680                if (pszOdin32Path)
     4681                    free((void*)pszOdin32Path);
     4682                pszOdin32Path = pszPath;
     4683                sfnKernel32 = pMTE->mte_sfn;
     4684
     4685                return TRUE;
     4686            }
     4687        }
     4688    }
     4689
     4690    /*
     4691     * Try find it searching the LIBPATHs.
     4692     * (Don't thing we should use ldrOpenPath since it
     4693     *  end's up calling ldrOpen - which is overloaded.)
     4694     */
     4695
     4696    return FALSE;
     4697}
     4698
     4699
    46494700/**
    46504701 * Static method which dumps a set of nt headers.
  • branches/GRACE/src/win32k/win32k.vpj

    r4046 r4052  
    143143test\init.asm
    144144test\win32ktst.c
    145 [ASSOCIATION]
    146 [STATE]
    147 SCREEN: 1600 1200 312 376 1244 800 0 0 M 0 0 0 0 1307 825
    148 CWD: H:\CODING\WORK\ODIN32\src\win32k
    149 BUFFER: BN="F:\VSLICK40\OS2\vrestore.slk"
    150 BI: MA=1 254 1  TABS=1 9  WWS=3 IWT=0 ST=0 IN=0 BW=0 US=0 RO=0 SE=0 SN=0 BIN=0 MN=Fundamental   HM=0 MF=1
    151 VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=22 HT=0 HN=0 HF=0 HC=4
    152 BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
    153 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=872
    154 VIEW: LN=.33849 CL=40 LE=0 CX=39 CY=30 WI=5 BI=17 HT=0 HN=0 HF=0 HC=4
    155 BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\ldr\myldrOpen.cpp"
    156 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=0
    157 VIEW: LN=.11154 C CY=1 WI=5 BI=9 HT=0 HN=0 HF=0 HC=4
    158 BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
    159 BI: MA=1 74 1  TABS=1 5  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=0 SE=1 SN=0 BIN=0 MN=C  HM=0 MF=872
    160 VIEW: LN=.6408 CL=13 LE=0 CX=12 CY=38 WI=5 BI=10 HT=0 HN=0 HF=0 HC=4
    161 WINDOW: 26 25 967 704 -1 -1 M  WF=0 WT=2 "System Monospaced,10,0,1"
    162 BUFFER: BN="H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c"
    163 VIEW: LN=.6119 CL=76 LE=0 CX=75 CY=29 WI=194 BI=10 HT=0 HN=0 HF=0 HC=4
    164 FILEHIST: 5
    165 F:\VSLICK40\OS2\vrestore.slk
    166 H:\coding\work\odin32\src\win32k\libconv.c
    167 H:\coding\work\odin32\src\win32k\makefile
    168 H:\CODING\WORK\ODIN32\src\win32k\include\test.h
    169 H:\CODING\WORK\ODIN32\src\win32k\test\win32ktst.c
    170 PRINTER: 2
    171145
    172 
    173 
Note: See TracChangeset for help on using the changeset viewer.