Changeset 3993 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Aug 11, 2000, 12:56:27 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r3975 r3993 1 /* $Id: wprocess.cpp,v 1.8 5 2000-08-09 18:59:03sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.86 2000-08-11 10:56:20 sandervl Exp $ */ 2 2 3 3 /* … … 25 25 #include "winexepeldr.h" 26 26 #include "winfakepeldr.h" 27 #include "windlllx.h" 27 28 #include <vmutex.h> 28 29 #include <handlemanager.h> … … 51 52 //****************************************************************************** 52 53 //****************************************************************************** 53 BOOL fFreeLibrary = FALSE;54 54 BOOL fIsOS2Image = FALSE; //TRUE -> Odin32 OS/2 application (not converted!) 55 55 //FALSE -> otherwise … … 448 448 return(TRUE); 449 449 } 450 dprintf(("KERNEL32: FreeLibrary %s %X\n", OSLibGetDllName(hinstance), hinstance)); 451 452 //TODO: Not thread safe 453 fFreeLibrary = TRUE; //ditch dll 454 rc = O32_FreeLibrary(hinstance); 455 fFreeLibrary = FALSE; 456 dprintf(("FreeLibrary returned %X\n", rc)); 450 dprintf(("WARNING: KERNEL32: FreeLibrary %s %x NOT FOUND!", OSLibGetDllName(hinstance), hinstance)); 457 451 return(TRUE); 458 452 } … … 707 701 if (pModule) 708 702 { 709 if (pModule->isLxDll() && !pModule->isLoaded() && fPeLoader)710 {711 //can happen with i.e. wininet712 //wininet depends on wsock32; when the app loads wsock32 afterwards713 //with LoadLibrary or as a child of another dll, we need to make714 //sure it's loaded once with DosLoadModule715 pModule->setLoadLibrary();716 }717 703 pModule->incDynamicLib(); 718 704 pModule->AddRef(); … … 771 757 { 772 758 /* OS/2 dll, system dll, converted dll or win32k took care of it.*/ 773 pModule = Win32DllBase::findModule(hDll);774 if 759 pModule = (Win32DllBase *)Win32LxDll::findModuleByOS2Handle(hDll); 760 if(pModule) 775 761 { 776 if (pModule->isLxDll() && fPeLoader) 762 763 if(pModule->isLxDll()) 777 764 { 778 pModule->setLoadLibrary(); 779 pModule->AddRef(); 765 ((Win32LxDll *)pModule)->setDllHandleOS2(hDll); 766 if(fPeLoader) { 767 pModule->AddRef(); 768 } 780 769 } 781 770 pModule->incDynamicLib(); 782 771 } 772 else { 773 return hDll; //happens when LoadLibrary is called in kernel32's initterm (nor harmful) 774 } 783 775 dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): returns 0x%x. Loaded %s using O32_LoadLibrary.", 784 776 lpszLibFile, hFile, dwFlags, hDll, szModname)); 785 return hDll;777 return pModule->getInstanceHandle(); 786 778 } 787 779 dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): O32_LoadLibrary(%s) failed. LastError=%d", … … 1099 1091 lpszPath[rc-1] = 0; 1100 1092 } 1093 //only needed for call inside kernel32's initterm (profile init) 1101 1094 else rc = O32_GetModuleFileName(hinstModule, lpszPath, cchPath); 1102 1095 1103 1096 if(rc) { 1104 dprintf(("KERNEL32: GetModuleFileName %s %d\n", lpszPath, hinstModule)); 1105 } 1097 dprintf(("KERNEL32: GetModuleFileName %s %d\n", lpszPath, hinstModule)); 1098 } 1099 else dprintf(("KERNEL32: WARNING: GetModuleFileName %x not found!", hinstModule)); 1106 1100 return(rc); 1107 1101 } … … 1132 1126 if(lpszModule == NULL) { 1133 1127 if(WinExe) 1134 hMod = WinExe->getInstanceHandle();1128 hMod = WinExe->getInstanceHandle(); 1135 1129 else hMod = -1; 1136 1130 } 1137 else { 1131 else 1132 { 1138 1133 strcpy(szModule, OSLibStripPath((char *)lpszModule)); 1139 1134 strupr(szModule); … … 1158 1153 windll = Win32DllBase::findModule(szModule); 1159 1154 if(windll) { 1160 hMod = windll->getInstanceHandle(); 1161 } 1162 else hMod = OSLibiGetModuleHandleA((char *)lpszModule); 1155 hMod = windll->getInstanceHandle(); 1156 } 1163 1157 } 1164 1158 }
Note:
See TracChangeset
for help on using the changeset viewer.