Changeset 4003 for trunk/src


Ignore:
Timestamp:
Aug 12, 2000, 6:58:40 PM (25 years ago)
Author:
sandervl
Message:

system dll unload bug fixed

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

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

    r3998 r4003  
    1 /* $Id: windlllx.cpp,v 1.13 2000-08-11 21:45:23 sandervl Exp $ */
     1/* $Id: windlllx.cpp,v 1.14 2000-08-12 16:58:39 sandervl Exp $ */
    22
    33/*
     
    228228 ULONG     ret;
    229229 APIRET    rc;
     230 BOOL      fNoUnload = fDisableUnload; //only set for kernel32.dll
    230231
    231232  hinst = hinstanceOS2;
    232233  ret = Win32DllBase::Release();
    233   if(ret == 0 && !fDisableUnload) {//only set for kernel32.dll (fDisableUnload)
     234  if(ret == 0 && !fNoUnload) {//only set for kernel32.dll (fDisableUnload)
    234235        //DosFreeModule sends a termination message to the dll.
    235236        //The LX dll informs us when it's removed (UnregisterDll call)
     
    265266   dlllistmutex.enter();
    266267
    267    Win32LxDll *mod = (Win32LxDll*)Win32DllBase::head;
     268   Win32DllBase *mod = Win32DllBase::getFirst();
    268269   while(mod != NULL) {
    269         if(mod->isLxDll() && mod->hinstanceOS2 == hinstance) {
    270                 dlllistmutex.leave();
    271                 return(mod);
     270        if(mod->isLxDll()) {
     271                Win32LxDll *lxdll = (Win32LxDll *)mod;
     272                if(lxdll->hinstanceOS2 == hinstance) {
     273                        dlllistmutex.leave();
     274                        return(lxdll);
     275                }
    272276        }
    273         mod = (Win32LxDll*)mod->next;
     277        mod = mod->getNext();
    274278   }
    275279   dlllistmutex.leave();
  • trunk/src/kernel32/winimagebase.cpp

    r3824 r4003  
    1 /* $Id: winimagebase.cpp,v 1.24 2000-07-15 09:14:26 sandervl Exp $ */
     1/* $Id: winimagebase.cpp,v 1.25 2000-08-12 16:58:40 sandervl Exp $ */
    22
    33/*
     
    251251  }
    252252  rc = DosRead(win32handle, pdoshdr, sizeof(IMAGE_DOS_HEADER), &ulRead);
    253   if(rc != NO_ERROR) {
     253  if(rc != NO_ERROR || ulRead != sizeof(IMAGE_DOS_HEADER)) {
    254254        free(pdoshdr);
    255255        DosClose(win32handle);                /* Close the file */
     
    273273  }
    274274  rc = DosRead(win32handle, win32file, hdrsize, &ulRead);
    275   if(rc != NO_ERROR) {
     275  if(rc != NO_ERROR || ulRead != hdrsize) {
    276276        goto failure;
    277277  }
Note: See TracChangeset for help on using the changeset viewer.