Changeset 4304 for trunk/src/kernel32/winimagepe2lx.cpp
- Timestamp:
- Sep 22, 2000, 6:35:09 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepe2lx.cpp
r4167 r4304 1 /* $Id: winimagepe2lx.cpp,v 1.1 4 2000-09-02 21:14:50bird Exp $ */1 /* $Id: winimagepe2lx.cpp,v 1.15 2000-09-22 04:35:09 bird Exp $ */ 2 2 3 3 /* … … 147 147 Win32Pe2LxImage::Win32Pe2LxImage(HINSTANCE hinstance, BOOL fWin32k) 148 148 : Win32ImageBase(hinstance), 149 paSections(NULL), cSections(0), pNtHdrs(NULL), fWin32k(fWin32k) 149 paSections(NULL), cSections(0), pNtHdrs(NULL), fWin32k(fWin32k), 150 hmod(hinstance) 150 151 { 151 152 setFullPath(szFileName); … … 174 175 * Validate the NT headers. 175 176 * Read the PE section table the set the RVAs in paSections. 177 * Set instance handle to address of header. 176 178 * Locate and set the entrypoint. 177 179 * Locate the resource directory (if any). (pResRootDir, ulRVAResourceSection) … … 242 244 return FALSE; 243 245 } 246 247 /* Set instance handle to address of header. */ 248 hinstance = (HINSTANCE)paSections[0].ulAddress; 244 249 245 250 /* Locate and set the entrypoint. */ … … 401 406 * If there is a buffer overflow we'll allocate more storage and retry. 402 407 */ 403 rc = W32kQueryOTEs(h instance, pQOte, cbQte);408 rc = W32kQueryOTEs(hmod, pQOte, cbQte); 404 409 while (rc == ERROR_BUFFER_OVERFLOW && cbQte < 32000); 405 410 { … … 413 418 } 414 419 415 rc = W32kQueryOTEs(h instance, pQOte, cbQte);420 rc = W32kQueryOTEs(hmod, pQOte, cbQte); 416 421 } 417 422 … … 508 513 + sizeof(qsLObjrec_t) * pLrec->ctObj); 509 514 } 510 if (pLrec->hmte == h instance)515 if (pLrec->hmte == hmod) 511 516 break; 512 517 … … 757 762 ULONG ulApiAddr; 758 763 759 rc = DosQueryProcAddr(h instance, 0, name, (PFN *)&ulApiAddr);764 rc = DosQueryProcAddr(hmod, 0, name, (PFN *)&ulApiAddr); 760 765 return rc == NO_ERROR ? ulApiAddr : 0; 761 766 } … … 778 783 ULONG ulApiAddr; 779 784 780 rc = DosQueryProcAddr(h instance, ordinal, NULL, (PFN *)&ulApiAddr);785 rc = DosQueryProcAddr(hmod, ordinal, NULL, (PFN *)&ulApiAddr); 781 786 782 787 return rc == NO_ERROR ? ulApiAddr : 0;
Note:
See TracChangeset
for help on using the changeset viewer.