Ignore:
Timestamp:
Mar 4, 2000, 8:52:37 PM (25 years ago)
Author:
sandervl
Message:

DosOpen (file handle error) & dll destruction bugfixes

File:
1 edited

Legend:

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

    r2802 r3005  
    1 /* $Id: windllbase.cpp,v 1.9 2000-02-16 14:22:11 sandervl Exp $ */
     1/* $Id: windllbase.cpp,v 1.10 2000-03-04 19:52:36 sandervl Exp $ */
    22
    33/*
     
    4949                 : Win32ImageBase(hinstance),
    5050                   referenced(0), fSkipEntryCalls(FALSE),
    51                    fAttachedToProcess(FALSE), fUnloaded(FALSE)
     51                   fAttachedToProcess(FALSE), fUnloaded(FALSE), fDynamicLoad(FALSE)
    5252{
    5353  dllEntryPoint = DllEntryPoint;
     
    9696Win32DllBase::~Win32DllBase()
    9797{
    98  Win32DllBase *dll = head;
    99 
    10098  dprintf(("Win32DllBase::~Win32DllBase %s", szModule));
    10199
     
    110108  }
    111109  else {
     110        Win32DllBase *dll = head;
    112111        while(dll && dll->next != this) {
    113112                dll = dll->next;
     
    294293//******************************************************************************
    295294//******************************************************************************
    296 void Win32DllBase::deleteAll()
    297 {
     295void Win32DllBase::deleteAll(BOOL fDynamicLoad)
     296{
     297 Win32DllBase *dll = Win32DllBase::head, *tmp;
     298
    298299#ifdef DEBUG
    299300  dlllistmutex.enter();
    300   Win32DllBase *dll = head;
    301301
    302302  dprintf(("Win32DllBase::deleteAll: List of loaded dlls:"));
     
    306306  }
    307307  dlllistmutex.leave();
     308  dll = Win32DllBase::head;
    308309#endif
    309310
    310   while(Win32DllBase::head) {
    311         delete Win32DllBase::head;
     311  while(dll) {
     312        if(fDynamicLoad || !dll->fDynamicLoad) {
     313                tmp = dll->next;
     314                dll->Release();
     315                dll = tmp;
     316        }
     317        else    dll = dll->next;
    312318  }
    313319}
Note: See TracChangeset for help on using the changeset viewer.