- Timestamp:
- Feb 9, 2001, 7:31:06 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r4867 r5075 1 ; $Id: KERNEL32.DEF,v 1.9 6 2001-01-02 18:16:40sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.97 2001-02-09 18:31:05 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 1120 1120 1121 1121 ;shared memory allocation 1122 _smalloc__FUi@1271 NONAME1122 sharedHeap @1271 NONAME 1123 1123 1124 1124 ;code memory allocation 1125 _cmalloc__FUi@1272 NONAME1125 codeHeap @1272 NONAME 1126 1126 1127 1127 ;VSemaphore -
trunk/src/kernel32/heapcode.cpp
r2802 r5075 1 /* $Id: heapcode.cpp,v 1. 2 2000-02-16 14:23:57sandervl Exp $ */1 /* $Id: heapcode.cpp,v 1.3 2001-02-09 18:31:05 sandervl Exp $ */ 2 2 /* 3 3 * Code heap functions for OS/2 … … 22 22 #include "dbglocal.h" 23 23 24 staticHeap_t codeHeap = 0;24 Heap_t codeHeap = 0; 25 25 static PVOID pCodeMem = NULL; 26 26 … … 67 67 //****************************************************************************** 68 68 //****************************************************************************** 69 void *_cmalloc(size_t size)70 {71 return _umalloc(codeHeap, size);72 }73 //******************************************************************************74 //******************************************************************************75 69 void * _LNK_CONV getmoreCodeMem(Heap_t pHeap, size_t *size, int *clean) 76 70 { -
trunk/src/kernel32/heapshared.cpp
r3704 r5075 1 /* $Id: heapshared.cpp,v 1. 6 2000-06-14 02:27:33 phallerExp $ */1 /* $Id: heapshared.cpp,v 1.7 2001-02-09 18:31:05 sandervl Exp $ */ 2 2 /* 3 3 * Shared heap functions for OS/2 … … 102 102 //****************************************************************************** 103 103 //****************************************************************************** 104 void *_smalloc(size_t size)105 {106 return _umalloc(sharedHeap, size);107 }108 //******************************************************************************109 //******************************************************************************110 104 ULONG GetPageRangeFree(ULONG pageoffset) 111 105 { -
trunk/src/kernel32/windlllx.cpp
r4433 r5075 1 /* $Id: windlllx.cpp,v 1.1 6 2000-10-05 18:36:49sandervl Exp $ */1 /* $Id: windlllx.cpp,v 1.17 2001-02-09 18:31:05 sandervl Exp $ */ 2 2 3 3 /* … … 32 32 #include "winexepeldr.h" 33 33 #include <odinlx.h> 34 #include <wprocess.h> 34 35 #include "oslibmisc.h" 35 36 … … 71 72 //once for a dll (to make sure OS/2 doesn't unload the dll when it's 72 73 //still needed) 74 //testestest 73 75 rc = DosLoadModule(szErrName, sizeof(szErrName), szFileName, &hInstance); 74 76 if(rc != 0) { … … 76 78 return 0; 77 79 } 80 //testestest 78 81 windll = new Win32LxDll(hInstance, EntryPoint, pResData, MajorImageVersion, 79 82 MinorImageVersion, Subsystem); … … 125 128 windll->addDependency(windlldep); 126 129 } 130 else dprintf(("WARNING: Can't find dll %s referenced by %s", modulename, windll->getModuleName())); 127 131 offset += modsize + 1; 128 132 } … … 164 168 Win32DllBase(hInstance, EntryPoint) 165 169 { 170 this->MajorImageVersion = MajorImageVersion; 171 this->MinorImageVersion = MinorImageVersion; 172 this->Subsystem = Subsystem; 173 166 174 if(EntryPoint == NULL) { 167 175 fSkipThreadEntryCalls = TRUE; … … 229 237 ULONG Win32LxDll::Release() 230 238 { 231 HINSTANCE hinst; 232 ULONG ret; 233 APIRET rc; 234 BOOL fNoUnload = fDisableUnload; //only set for kernel32.dll 239 HINSTANCE hinst; 240 WIN32DLLENTRY EntryPointTmp = dllEntryPoint; 241 PVOID pResDataTmp = (PVOID)pResRootDir; 242 DWORD MajorImageVersionTmp = MajorImageVersion; 243 DWORD MinorImageVersionTmp = MinorImageVersion; 244 DWORD SubsystemTmp = Subsystem; 245 ULONG ret; 246 APIRET rc; 247 BOOL fNoUnload = fDisableUnload; //only set for kernel32.dll 248 Win32LxDll *pModule; 235 249 236 250 hinst = hinstanceOS2; … … 241 255 rc = DosFreeModule(hinst); 242 256 if(rc) { 243 dprintf(("Win32LxDll::Release: DosFreeModule %x returned %d", hinst, rc)); 257 dprintf(("Win32LxDll::Release: DosFreeModule %x returned %d", hinst, rc)); 258 if(rc == ERROR_INVALID_ACCESS && !fExitProcess) { 259 //Dll refused to unload because it has an active exitlist handler 260 //or depends on a dll that registered an exitlist handler 261 //In this case the handle remains valid and the entrypoint of 262 //the dll is NOT called for DLL_PROCESS_DETACH 263 //WORKAROUND: Re-register the dll so future LoadLibrary calls 264 // don't fail! 265 dprintf(("WORKAROUND: Re-register the dll so future LoadLibrary calls don't fail!")); 266 RegisterLxDll(hinst, EntryPointTmp, pResDataTmp, 267 MajorImageVersionTmp, 268 MinorImageVersionTmp, 269 SubsystemTmp); 270 271 /* OS/2 dll, system dll, converted dll or win32k took care of it. */ 272 pModule = Win32LxDll::findModuleByOS2Handle(hinst); 273 if(pModule) 274 { 275 pModule->setDllHandleOS2(hinst); 276 if(fPeLoader) 277 { 278 if(pModule->AddRef() == -1) {//-1 -> load failed (attachProcess) 279 dprintf(("ERROR Dll refused to be loaded; aborting")); 280 DebugInt3(); 281 delete pModule; 282 return 0; 283 } 284 } 285 pModule->incDynamicLib(); 286 } 287 else DebugInt3(); 288 } 244 289 } 245 290 } -
trunk/src/kernel32/windlllx.h
r3993 r5075 1 /* $Id: windlllx.h,v 1. 2 2000-08-11 10:56:19sandervl Exp $ */1 /* $Id: windlllx.h,v 1.3 2001-02-09 18:31:05 sandervl Exp $ */ 2 2 3 3 /* … … 38 38 39 39 protected: 40 40 DWORD MajorImageVersion; 41 DWORD MinorImageVersion; 42 DWORD Subsystem; 41 43 private: 42 44 }; -
trunk/src/kernel32/wprocess.cpp
r5016 r5075 1 /* $Id: wprocess.cpp,v 1.11 2 2001-01-23 11:59:45sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.113 2001-02-09 18:31:06 sandervl Exp $ */ 2 2 3 3 /* … … 1529 1529 lpEnvironment, lpCurrentDirectory, lpStartupInfo)); 1530 1530 1531 #ifdef DEBUG 1532 if(lpStartupInfo) { 1533 dprintf(("lpStartupInfo->lpReserved %x", lpStartupInfo->lpReserved)); 1534 dprintf(("lpStartupInfo->lpDesktop %x", lpStartupInfo->lpDesktop)); 1535 dprintf(("lpStartupInfo->lpTitle %s", lpStartupInfo->lpTitle)); 1536 dprintf(("lpStartupInfo->dwX %x", lpStartupInfo->dwX)); 1537 dprintf(("lpStartupInfo->dwY %x", lpStartupInfo->dwY)); 1538 dprintf(("lpStartupInfo->dwXSize %x", lpStartupInfo->dwXSize)); 1539 dprintf(("lpStartupInfo->dwYSize %x", lpStartupInfo->dwYSize)); 1540 dprintf(("lpStartupInfo->dwXCountChars %x", lpStartupInfo->dwXCountChars)); 1541 dprintf(("lpStartupInfo->dwYCountChars %x", lpStartupInfo->dwYCountChars)); 1542 dprintf(("lpStartupInfo->dwFillAttribute %x", lpStartupInfo->dwFillAttribute)); 1543 dprintf(("lpStartupInfo->dwFlags %x", lpStartupInfo->dwFlags)); 1544 dprintf(("lpStartupInfo->wShowWindow %x", lpStartupInfo->wShowWindow)); 1545 dprintf(("lpStartupInfo->hStdInput %x", lpStartupInfo->hStdInput)); 1546 dprintf(("lpStartupInfo->hStdOutput %x", lpStartupInfo->hStdOutput)); 1547 dprintf(("lpStartupInfo->hStdError %x", lpStartupInfo->hStdError)); 1548 } 1549 #endif 1550 1531 1551 // open32 does not support DEBUG_ONLY_THIS_PROCESS 1532 1552 if(dwCreationFlags & DEBUG_ONLY_THIS_PROCESS)
Note:
See TracChangeset
for help on using the changeset viewer.