Ignore:
Timestamp:
Sep 22, 2000, 6:35:09 AM (25 years ago)
Author:
bird
Message:

Changed hinstance to address of module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winimagepe2lx.cpp

    r4167 r4304  
    1 /* $Id: winimagepe2lx.cpp,v 1.14 2000-09-02 21:14:50 bird Exp $ */
     1/* $Id: winimagepe2lx.cpp,v 1.15 2000-09-22 04:35:09 bird Exp $ */
    22
    33/*
     
    147147Win32Pe2LxImage::Win32Pe2LxImage(HINSTANCE hinstance, BOOL fWin32k)
    148148    : Win32ImageBase(hinstance),
    149     paSections(NULL), cSections(0), pNtHdrs(NULL), fWin32k(fWin32k)
     149    paSections(NULL), cSections(0), pNtHdrs(NULL), fWin32k(fWin32k),
     150    hmod(hinstance)
    150151{
    151152    setFullPath(szFileName);
     
    174175 *            Validate the NT headers.
    175176 *            Read the PE section table the set the RVAs in paSections.
     177 *            Set instance handle to address of header.
    176178 *            Locate and set the entrypoint.
    177179 *            Locate the resource directory (if any). (pResRootDir, ulRVAResourceSection)
     
    242244        return FALSE;
    243245    }
     246
     247    /* Set instance handle to address of header. */
     248    hinstance = (HINSTANCE)paSections[0].ulAddress;
    244249
    245250    /* Locate and set the entrypoint. */
     
    401406             * If there is a buffer overflow we'll allocate more storage and retry.
    402407             */
    403             rc = W32kQueryOTEs(hinstance, pQOte, cbQte);
     408            rc = W32kQueryOTEs(hmod, pQOte, cbQte);
    404409            while (rc == ERROR_BUFFER_OVERFLOW && cbQte < 32000);
    405410            {
     
    413418                }
    414419
    415                 rc = W32kQueryOTEs(hinstance, pQOte, cbQte);
     420                rc = W32kQueryOTEs(hmod, pQOte, cbQte);
    416421            }
    417422
     
    508513                                                   + sizeof(qsLObjrec_t) * pLrec->ctObj);
    509514                    }
    510                 if (pLrec->hmte == hinstance)
     515                if (pLrec->hmte == hmod)
    511516                    break;
    512517
     
    757762    ULONG       ulApiAddr;
    758763
    759     rc = DosQueryProcAddr(hinstance, 0, name, (PFN *)&ulApiAddr);
     764    rc = DosQueryProcAddr(hmod, 0, name, (PFN *)&ulApiAddr);
    760765    return rc == NO_ERROR ? ulApiAddr : 0;
    761766}
     
    778783    ULONG       ulApiAddr;
    779784
    780     rc = DosQueryProcAddr(hinstance, ordinal, NULL, (PFN *)&ulApiAddr);
     785    rc = DosQueryProcAddr(hmod, ordinal, NULL, (PFN *)&ulApiAddr);
    781786
    782787    return rc == NO_ERROR ? ulApiAddr : 0;
Note: See TracChangeset for help on using the changeset viewer.