Changeset 4076 for branches/GRACE/src


Ignore:
Timestamp:
Aug 24, 2000, 3:36:29 AM (25 years ago)
Author:
bird
Message:

Tested and corrected bugs.

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

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/pe2lx/pe2lx.cpp

    r4068 r4076  
    1 /* $Id: pe2lx.cpp,v 1.18.4.6 2000-08-22 03:00:22 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.18.4.7 2000-08-24 01:36:26 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    13281328    #ifdef RING0
    13291329    #if 1
     1330    initOdin32Path();
    13301331    return ldrOpenPath(pachModname, cchModname, pLdrLv, pfl);
    13311332    #else
     
    46964697BOOL Pe2Lx::initOdin32Path()
    46974698{
    4698     #if 0
     4699    #ifdef RING0
    46994700    APIRET rc;
    47004701    PMTE   pMTE;
     
    47084709     */
    47094710    pMTE = NULL;
    4710     rc = ldrFindModule("KERNEL32", 8, CLASS_GLOBAL, &pMTE);
     4711    rc = ldrFindModule("KERNEL32", 8, CLASS_GLOBAL, (PPMTE)SSToDS(&pMTE));
    47114712    if (rc == NO_ERROR && pMTE != NULL && pMTE->mte_swapmte != NULL)
    47124713    {
     
    47444745    ul = options.fNoLoader;
    47454746    options.fNoLoader = TRUE;
    4746     rc = ldrOpenPath("KERNEL32", 8, &lv, &ful);
     4747    lv.lv_class = CLASS_GLOBAL;
     4748    rc = ldrOpenPath("KERNEL32", 8, (ldrlv_t*)SSToDS(&lv), (PULONG)SSToDS(&ful));
    47474749    options.fNoLoader = ul;
    47484750    if (rc == NO_ERROR)
     
    47544756         * We'll close the file handle first of course.
    47554757         */
     4758        rc = setOdin32Path(ldrpFileNameBuf);
    47564759        ldrClose(lv.lv_sfn);
    4757         return setOdin32Path(ldrpFileNameBuf);
     4760        return rc;
    47584761    }
    47594762
  • branches/GRACE/src/win32k/test/fake.c

    r4073 r4076  
    1 /* $Id: fake.c,v 1.1.4.3 2000-08-23 04:25:45 bird Exp $
     1/* $Id: fake.c,v 1.1.4.4 2000-08-24 01:36:29 bird Exp $
    22 *
    33 * Fake stubs for the ldr and kernel functions we imports or overloads.
     
    858858    else
    859859    {
    860         fRc = (hkmtx->debug.ksem_Owner != usSlot);
     860        fRc = (hkmtx->debug.ksem_Owner == usSlot);
    861861        if (pcusNest)
    862862            *pcusNest = hkmtx->debug.ksem_cusNest;
     
    10411041
    10421042    printf("tkExecPgmWorker:                execFlag = %d, pArg = %p, pEnv = %p, pszFilename = %s\n", execFlag, pArg, pEnv, pszFilename);
     1043
     1044    /*
     1045     * Take loader semaphore.
     1046     */
     1047    rc = KSEMRequestMutex(&fakeLDRSem, KSEM_INDEFINITE_WAIT);
     1048    if (rc != NO_ERROR)
     1049    {
     1050        return rc;
     1051    }
    10431052
    10441053    /*
     
    17441753PMTE KRNLCALL fakeldrASMpMTEFromHandle(HMTE  hMTE)
    17451754{
    1746     hMTE = hMTE;
     1755    PMTE pMte = (PMTE)hMTE;
     1756
     1757    pMte += 10; //just do something!
     1758
    17471759    return NULL;
    17481760}
     
    17501762ULONG LDRCALL   fakeldrFindModule(PCHAR pachFilename, USHORT cchFilename, USHORT usClass, PPMTE ppMTE)
    17511763{
     1764    APIRET rc = NO_ERROR;
    17521765    usClass = usClass;
    17531766    cchFilename = cchFilename;
    17541767    pachFilename = pachFilename;
    17551768    *ppMTE = NULL;
    1756     return NO_ERROR;
    1757 }
    1758 
    1759 
     1769    return rc;
     1770}
     1771
     1772
Note: See TracChangeset for help on using the changeset viewer.