Changeset 9963 for trunk/src/kernel32/winimagepeldr.cpp
- Timestamp:
- Mar 31, 2003, 1:54:29 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepeldr.cpp
r9826 r9963 1 /* $Id: winimagepeldr.cpp,v 1.10 5 2003-02-18 18:58:47sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.106 2003-03-31 11:54:28 sandervl Exp $ */ 2 2 3 3 /* … … 186 186 187 187 hFile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 188 188 189 189 dprintf((LOG, "KERNEL32-PELDR: Opening PE-image (%s) returned handle %08xh.\n", 190 190 szFileName, … … 198 198 } 199 199 } 200 200 201 201 //default error: 202 202 strcpy(szErrorModule, OSLibStripPath(szFileName)); … … 702 702 return rc; 703 703 } 704 704 705 705 // PH 2001-11-15 706 706 // For corrupt or misinterpreted PE headers, … … 1597 1597 char szModuleFailure[CCHMAXPATH] = ""; 1598 1598 ULONG hInstanceNewDll; 1599 Win32LxDll *lxdll;1600 1599 1601 1600 char *dot = strchr(modname, '.'); … … 1610 1609 return NULL; 1611 1610 } 1612 lxdll = Win32LxDll::findModuleByOS2Handle(hInstanceNewDll); 1613 if(lxdll == NULL) {//shouldn't happen! 1611 /* bird 2003-03-30: search pe2lx dlls too! */ 1612 WinDll = Win32DllBase::findModuleByOS2Handle(hInstanceNewDll); 1613 if (WinDll == NULL) {//shouldn't happen! 1614 1614 dprintf((LOG, "Just loaded the dll, but can't find it anywhere?!!?")); 1615 1615 errorState = ERROR_INTERNAL; 1616 1616 return NULL; 1617 1617 } 1618 lxdll->setDllHandleOS2(hInstanceNewDll); 1619 if(lxdll->AddRef() == -1) {//-1 -> load failed (attachProcess) 1620 dprintf((LOG, "Dll %s refused to be loaded; aborting", modname)); 1621 delete lxdll; 1622 errorState = ERROR_INTERNAL; 1623 return NULL; 1624 } 1625 WinDll = (Win32DllBase*)lxdll; 1618 if (WinDll->isLxDll()) 1619 { 1620 Win32LxDll *lxdll = (Win32LxDll *)WinDll; 1621 lxdll->setDllHandleOS2(hInstanceNewDll); 1622 if(lxdll->AddRef() == -1) {//-1 -> load failed (attachProcess) 1623 dprintf((LOG, "Dll %s refused to be loaded; aborting", modname)); 1624 delete lxdll; 1625 errorState = ERROR_INTERNAL; 1626 return NULL; 1627 } 1628 WinDll = (Win32DllBase*)lxdll; 1629 } 1626 1630 } 1627 1631 else { … … 2113 2117 //Name exports also contain an ordinal, so check this 2114 2118 nexport = nameexports; 2115 for(int i=0;i<nrNameExports;i++) 2119 for(int i=0;i<nrNameExports;i++) 2116 2120 { 2117 2121 if(nexport->ordinal == ordinal) {
Note:
See TracChangeset
for help on using the changeset viewer.