- Timestamp:
- Jun 20, 1999, 2:46:34 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/except.h
r126 r130 1 /* $Id: except.h,v 1. 5 1999-06-20 10:55:36sandervl Exp $ */1 /* $Id: except.h,v 1.6 1999-06-20 12:46:08 sandervl Exp $ */ 2 2 3 3 /* … … 18 18 void ChangeTIBStack(); 19 19 #endif 20 void __cdecl SetExceptionChain(DWORD);20 void __cdecl SetExceptionChain(DWORD); 21 21 22 22 void DisableFPUExceptions(); -
trunk/src/kernel32/initterm.cpp
r126 r130 1 /* $Id: initterm.cpp,v 1. 5 1999-06-20 10:55:36sandervl Exp $ */1 /* $Id: initterm.cpp,v 1.6 1999-06-20 12:46:09 sandervl Exp $ */ 2 2 3 3 /* … … 119 119 return 0UL; 120 120 121 rc = DosExitList(0x00002A00|EXLST_ADD, Win32DllExitList);122 if (rc)123 return 0UL;124 125 121 /* knut: check for high memory support */ 126 122 rc = DosQuerySysInfo(QSV_VIRTUALADDRESSLIMIT, QSV_VIRTUALADDRESSLIMIT, &sysinfo, sizeof(sysinfo)); … … 150 146 static void APIENTRY cleanup(ULONG ulReason) 151 147 { 152 dprintf(("kernel32 exit \n"));148 dprintf(("kernel32 exit %d\n", ulReason)); 153 149 _dump_allocated(10); /*PLF Wed 98-03-18 23:55:07*/ 154 150 DestroyTIB(); -
trunk/src/kernel32/os2native.cpp
r120 r130 1 /* $Id: os2native.cpp,v 1. 3 1999-06-19 10:54:42sandervl Exp $ */1 /* $Id: os2native.cpp,v 1.4 1999-06-20 12:46:09 sandervl Exp $ */ 2 2 3 3 /* … … 108 108 rc = DosAllocMem(&Address, cbSize, flag | flAllocMem ); 109 109 } 110 else dprintf(("Unexpected DosSetMem error %x", rc)); 110 else 111 if(rc) dprintf(("Unexpected DosSetMem error %x", rc)); 111 112 } 112 113 } -
trunk/src/kernel32/windll.cpp
r120 r130 1 /* $Id: windll.cpp,v 1. 4 1999-06-19 10:54:43sandervl Exp $ */1 /* $Id: windll.cpp,v 1.5 1999-06-20 12:46:09 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 void _System SetLastError(ULONG ulError); 37 37 38 39 38 //****************************************************************************** 40 39 //****************************************************************************** … … 50 49 UpCase(szModule); 51 50 char *dot = strstr(szModule, "."); 51 while(dot) { 52 char *newdot = strstr(dot+1, "."); 53 if(newdot == NULL) break; 54 dot = newdot; 55 } 52 56 if(dot) 53 57 *dot = 0; 58 dprintf(("Win32Dll::Win32Dll %s %s", szFileName, szModule)); 54 59 } 55 60 //****************************************************************************** … … 69 74 UpCase(szModule); 70 75 char *dot = strstr(szModule, "."); 76 while(dot) { 77 char *newdot = strstr(dot+1, "."); 78 if(newdot == NULL) break; 79 dot = newdot; 80 } 71 81 if(dot) 72 82 *dot = 0; 73 83 84 dprintf(("Win32Dll::Win32Dll %s", szModule)); 74 85 } 75 86 //****************************************************************************** … … 85 96 UpCase(szModule); 86 97 char *dot = strstr(szModule, "."); 98 while(dot) { 99 char *newdot = strstr(dot+1, "."); 100 if(newdot == NULL) break; 101 dot = newdot; 102 } 87 103 if(dot) 88 104 *dot = 0; … … 95 111 { 96 112 Win32Dll *dll = head; 113 114 dprintf(("Win32Dll::~Win32Dll %s", szModule)); 97 115 98 116 //first remove it from the linked list so converted win32 dlls won't … … 111 129 dll->next = next; 112 130 } 113 if(errorState == NO_ERROR && !fUnloaded) { 114 if(fNativePEImage) { 131 if(errorState == NO_ERROR && !fUnloaded) 132 { 133 if(!fSystemDll) { 115 134 detachProcess(); 116 } 117 else { 118 if(!fSystemDll) //let OS/2 unload them, unless ordered by FreeLibrary (see ::Release) 119 DosFreeModule((HMODULE)hinstance); 120 } 135 } 121 136 } 122 137 } … … 185 200 "WNETAP32", "MPR", "OLE32", "ADVAPI32", "COMMDLG", 186 201 "WINSPOOL", "SHELL32", "TAPI32", "CAPI32", "VERSION", 187 "WSOCK32" };202 "WSOCK32", "COMCTL32"}; 188 203 //****************************************************************************** 189 204 BOOL Win32Dll::isSystemDll(char *szFileName) … … 249 264 } 250 265 251 //Add to look kup table, so we don't have to call DosQueryProcAddr266 //Add to lookup table, so we don't have to call DosQueryProcAddr 252 267 //multiple times for the same api (when imported by other dlls) 253 268 AddNameExport(apiaddr, name, 0); -
trunk/src/kernel32/wprocess.cpp
r126 r130 1 /* $Id: wprocess.cpp,v 1.1 1 1999-06-20 10:55:36sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.12 1999-06-20 12:46:09 sandervl Exp $ */ 2 2 3 3 /* … … 37 37 USHORT ProcessTIBSel = 0; 38 38 DWORD *TIBFlatPtr = 0; 39 40 extern "C" ULONG QueryExceptionChain(); 39 41 40 42 //****************************************************************************** … … 104 106 } 105 107 dprintf(("InitializeTIB setup TEB with selector %x", tibsel)); 108 dprintf(("InitializeTIB: FS(%x):[0] = %x", GetFS(), QueryExceptionChain())); 106 109 return winteb; 107 110 #else … … 119 122 THDB *thdb; 120 123 121 dprintf(("DestroyTIB: FS = %x", GetFS())); 124 dprintf(("DestroyTIB: FS = %x", GetFS())); 125 dprintf(("DestroyTIB: FS:[0] = %x", QueryExceptionChain())); 122 126 123 127 winteb = (TEB *)TIBFlatPtr; … … 134 138 else dprintf(("Already destroyed TIB")); 135 139 140 dprintf(("DestroyTIB: FS(%x):[0] = %x", GetFS(), QueryExceptionChain())); 136 141 TIBFlatPtr = NULL; 137 142 return; … … 225 230 RegisterExe(Win32TableId, NameTableId, VersionResId, Pe2lxVersion, hinstance); 226 231 227 dprintf(("RegisterResourceUsage: FS = %x", GetFS()));232 dprintf(("RegisterResourceUsage: FS(%x):[0] = %x", GetFS(), QueryExceptionChain())); 228 233 } 229 234 //****************************************************************************** … … 315 320 { 316 321 dprintf(("KERNEL32: ExitProcess %d\n", exitcode)); 317 318 #ifdef WIN32_TIBSEL 319 //Restore original OS/2 TIB selector 320 DestroyTIB(); 321 #endif 322 dprintf(("KERNEL32: ExitProcess FS = %x\n", GetFS())); 322 323 323 324 //avoid crashes since win32 & OS/2 exception handler aren't identical … … 327 328 iConsoleWaitClose(); 328 329 329 try { 330 Win32DllExitList(-1); 331 } 332 catch(...) { 333 dprintf(("dll exitlist exception\n")); 334 } 335 336 #ifndef WIN32_TIBSEL 330 Win32DllExitList(0); 331 332 //Restore original OS/2 TIB selector 333 DestroyTIB(); 337 334 SetExceptionChain((ULONG)-1); 338 #endif 335 339 336 O32_ExitProcess(exitcode); 340 337 }
Note:
See TracChangeset
for help on using the changeset viewer.