Changeset 2069 for trunk/src/kernel32/windllbase.cpp
- Timestamp:
- Dec 13, 1999, 10:07:40 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/windllbase.cpp
r2001 r2069 1 /* $Id: windllbase.cpp,v 1. 6 1999-12-06 21:31:43sandervl Exp $ */1 /* $Id: windllbase.cpp,v 1.7 1999-12-13 21:07:40 sandervl Exp $ */ 2 2 3 3 /* … … 6 6 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl) 7 7 * 8 * TODO: Unloading of system dlls is not correct for the PE loader 9 * (they're always put at the head of the list even though there 10 * might be a dependency with a win32 dll) 8 11 * 9 12 * Project Odin Software License can be found in LICENSE.TXT … … 39 42 //****************************************************************************** 40 43 //****************************************************************************** 41 Win32DllBase::Win32DllBase(HINSTANCE hinstance, WIN32DLLENTRY DllEntryPoint) 44 Win32DllBase::Win32DllBase(HINSTANCE hinstance, WIN32DLLENTRY DllEntryPoint, 45 Win32ImageBase *parent) 42 46 : Win32ImageBase(hinstance), 43 47 referenced(0), fSkipEntryCalls(FALSE), … … 47 51 48 52 dlllistmutex.enter(); 49 next = head; 50 head = this; 53 //unload of dlls needs to be done in reverse order of dependencies 54 //Note: Only necessary for pe loader; the OS/2 loader takes care of this 55 //for win32k/pe2lx 56 if(parent && parent->isDll()) { 57 Win32DllBase *dll = head; 58 while(dll) { 59 if(dll->getInstanceHandle() == parent->getInstanceHandle()) { 60 break; 61 } 62 dll = dll->next; 63 } 64 if(dll) { 65 //insert this dll in list after it's parent 66 next = dll->next; 67 dll->next = this; 68 } 69 else DebugInt3(); 70 } 71 else { 72 next = head; 73 head = this; 74 } 51 75 dlllistmutex.leave(); 76 77 #ifdef DEBUG_ENABLELOG_LEVEL2 78 dlllistmutex.enter(); 79 Win32DllBase *dll = head; 80 81 dprintf2(("Win32DllBase::Win32DllBase: List of loaded dlls:")); 82 while(dll) { 83 dprintf2(("DLL %s", dll->szModule)); 84 dll = dll->next; 85 } 86 dlllistmutex.leave(); 87 #endif 52 88 53 89 dprintf(("Win32DllBase::Win32DllBase %x %s", hinstance, szModule));
Note:
See TracChangeset
for help on using the changeset viewer.