Ignore:
Timestamp:
Mar 31, 2003, 1:54:29 PM (22 years ago)
Author:
sandervl
Message:

PF: Added vsnprintfW/snprintfW funcs for syncing with latest wine NTDLL + KDO: Made Pe2Lx dlls work again

File:
1 edited

Legend:

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

    r9826 r9963  
    1 /* $Id: winimagepeldr.cpp,v 1.105 2003-02-18 18:58:47 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.106 2003-03-31 11:54:28 sandervl Exp $ */
    22
    33/*
     
    186186
    187187    hFile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
    188  
     188
    189189    dprintf((LOG, "KERNEL32-PELDR: Opening PE-image (%s) returned handle %08xh.\n",
    190190             szFileName,
     
    198198        }
    199199    }
    200  
     200
    201201    //default error:
    202202    strcpy(szErrorModule, OSLibStripPath(szFileName));
     
    702702            return rc;
    703703        }
    704      
     704
    705705      // PH 2001-11-15
    706706      // For corrupt or misinterpreted PE headers,
     
    15971597        char   szModuleFailure[CCHMAXPATH] = "";
    15981598        ULONG  hInstanceNewDll;
    1599         Win32LxDll *lxdll;
    16001599
    16011600        char *dot = strchr(modname, '.');
     
    16101609            return NULL;
    16111610        }
    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!
    16141614            dprintf((LOG, "Just loaded the dll, but can't find it anywhere?!!?"));
    16151615            errorState = ERROR_INTERNAL;
    16161616            return NULL;
    16171617        }
    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        }
    16261630    }
    16271631    else {
     
    21132117    //Name exports also contain an ordinal, so check this
    21142118    nexport = nameexports;
    2115     for(int i=0;i<nrNameExports;i++) 
     2119    for(int i=0;i<nrNameExports;i++)
    21162120    {
    21172121        if(nexport->ordinal == ordinal) {
Note: See TracChangeset for help on using the changeset viewer.