Ignore:
Timestamp:
Mar 9, 2000, 8:03:23 PM (25 years ago)
Author:
sandervl
Message:

Dll dependency changes

File:
1 edited

Legend:

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

    r3005 r3059  
    1 /* $Id: winimagepeldr.cpp,v 1.34 2000-03-04 19:52:36 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.35 2000-03-09 19:03:22 sandervl Exp $ */
    22
    33/*
     
    3737#include <misc.h>
    3838#include <win32api.h>
    39 #include <winimagebase.h>
    40 #include <winimagepeldr.h>
    41 #include <windllpeldr.h>
     39#include "winimagebase.h"
     40#include "winimagepeldr.h"
     41#include "windllpeldr.h"
    4242#include <pefile.h>
    4343#include <unicode.h>
     
    13891389                        return(FALSE);
    13901390                }
     1391                //Mark this dll as loaded by DosLoadModule
     1392                WinDll->setLoadLibrary();
     1393                WinDll->AddRef();
    13911394        }
    13921395        else {
     
    14061409                    return(FALSE);
    14071410                }
     1411#ifdef DEBUG
     1412                WinDll->AddRef(getModuleName());
     1413#else
     1414                WinDll->AddRef();
     1415#endif
    14081416                if(WinDll->attachProcess() == FALSE) {
    14091417                    dprintf((LOG, "attachProcess failed!" ));
     1418                    delete WinDll;
    14101419                    errorState = ERROR_INTERNAL;
    14111420                    return(FALSE);
    14121421                }
    14131422        }
     1423
    14141424        dprintf((LOG, "**********************************************************************" ));
    14151425        dprintf((LOG, "**********************  Finished Loading Module  *********************" ));
    14161426        dprintf((LOG, "**********************************************************************" ));
    14171427    }
    1418     else    dprintf((LOG, "Already found ", pszCurModule ));
    1419 
    1420     WinDll->AddRef();
     1428    else {
     1429        if(WinDll->isLxDll() && !WinDll->isLoaded()) {
     1430                //can happen with i.e. wininet
     1431                //wininet depends on wsock32; when the app loads wsock32 afterwards
     1432                //with LoadLibrary or as a child of another dll, we need to make
     1433                //sure it's loaded once with DosLoadModule
     1434                WinDll->loadLibrary();
     1435        }
     1436        WinDll->AddRef();
     1437       
     1438        dprintf((LOG, "Already found ", pszCurModule));
     1439    }
     1440    //add the dll we just loaded to dependency list for this image
     1441    addDependency((Win32DllBase *)WinDll);
     1442
     1443    //Make sure the dependency list is correct (already done
     1444    //in the ctor of Win32DllBase, but for LX dlls the parent is
     1445    //then set to NULL; so change it here again
     1446    WinDll->setUnloadOrder(this);
    14211447
    14221448    pulImport  = (PULONG)((ULONG)pulImport + (ULONG)win32file);
Note: See TracChangeset for help on using the changeset viewer.