- Timestamp:
- Feb 6, 2002, 5:33:40 PM (24 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r7797 r7811 1 ; $Id: KERNEL32.DEF,v 1.12 8 2002-02-03 13:16:22sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.129 2002-02-06 16:33:38 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 1096 1096 1097 1097 RestoreOS2TIB = _RestoreOS2TIB@0 @1228 NONAME 1098 SetWin32TIB = _SetWin32TIB@ 0@1229 NONAME1098 SetWin32TIB = _SetWin32TIB@4 @1229 NONAME 1099 1099 RestoreOS2FS = RestoreOS2FS @1230 NONAME 1100 1100 -
trunk/src/kernel32/windllbase.cpp
r6249 r7811 1 /* $Id: windllbase.cpp,v 1.2 7 2001-07-08 11:02:10sandervl Exp $ */1 /* $Id: windllbase.cpp,v 1.28 2002-02-06 16:33:38 sandervl Exp $ */ 2 2 3 3 /* … … 407 407 if(fSetExceptionHandler) { 408 408 OS2SetExceptionHandler((void *)&exceptFrame); 409 sel = SetWin32TIB( );409 sel = SetWin32TIB(isPEImage() ? TIB_SWITCH_FORCE_WIN32 : TIB_SWITCH_DEFAULT); 410 410 } 411 411 … … 482 482 483 483 fUnloaded = TRUE; 484 sel = SetWin32TIB( );484 sel = SetWin32TIB(isPEImage() ? TIB_SWITCH_FORCE_WIN32 : TIB_SWITCH_DEFAULT); 485 485 486 486 // @@@PH 2000/06/13 lpvReserved, Starcraft STORM.DLL … … 497 497 rc = dllEntryPoint(hinstance, DLL_PROCESS_DETACH, lpvReserved); 498 498 499 SetFS(sel); 499 SetFS(sel); //restore FS 500 500 tlsDetachThread(); //destroy TLS (main thread) 501 501 tlsDelete(); -
trunk/src/kernel32/winexebase.cpp
r6133 r7811 1 /* $Id: winexebase.cpp,v 1.1 8 2001-06-27 19:09:36sandervl Exp $ */1 /* $Id: winexebase.cpp,v 1.19 2002-02-06 16:33:38 sandervl Exp $ */ 2 2 3 3 /* … … 108 108 // in OS/2 109 109 OS2SetExceptionHandler((void *)&exceptFrame); 110 SetWin32TIB();110 USHORT sel = SetWin32TIB(isPEImage() ? TIB_SWITCH_FORCE_WIN32 : TIB_SWITCH_DEFAULT); 111 111 112 112 //Set FPU control word to 0x27F (same as in NT) … … 115 115 (void*)entryPoint )); 116 116 rc = CallEntryPoint(entryPoint, NULL); 117 RestoreOS2TIB(); 117 118 SetFS(sel); //restore FS 118 119 119 120 OS2UnsetExceptionHandler((void *)&exceptFrame); -
trunk/src/kernel32/winimagebase.cpp
r6412 r7811 1 /* $Id: winimagebase.cpp,v 1.3 3 2001-07-30 12:01:25sandervl Exp $ */1 /* $Id: winimagebase.cpp,v 1.34 2002-02-06 16:33:39 sandervl Exp $ */ 2 2 3 3 /* … … 49 49 tlsAddress(0), tlsIndexAddr(0), tlsInitSize(0), tlsTotalSize(0), 50 50 tlsCallBackAddr(0), tlsIndex(-1), pResRootDir(NULL), 51 ulRVAResourceSection(0) 51 ulRVAResourceSection(0), fIsPEImage(FALSE) 52 52 { 53 53 char *name; -
trunk/src/kernel32/winimagebase.h
r6975 r7811 1 /* $Id: winimagebase.h,v 1.2 0 2001-10-09 20:25:20sandervl Exp $ */1 /* $Id: winimagebase.h,v 1.21 2002-02-06 16:33:39 sandervl Exp $ */ 2 2 3 3 /* … … 123 123 virtual ULONG getImageSize(); 124 124 125 virtual BOOL isDll() = 0; 125 virtual BOOL isDll() = 0; 126 BOOL isPEImage() { return fIsPEImage; }; 126 127 127 128 static Win32ImageBase * findModule(HMODULE hModule); … … 145 146 146 147 HINSTANCE hinstance; 148 BOOL fIsPEImage; 147 149 148 150 LPVOID tlsAddress; //address of TLS data -
trunk/src/kernel32/winimagepeldr.cpp
r7670 r7811 1 /* $Id: winimagepeldr.cpp,v 1.9 4 2001-12-22 12:34:06sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.95 2002-02-06 16:33:39 sandervl Exp $ */ 2 2 3 3 /* … … 119 119 HFILE dllfile; 120 120 121 fIsPEImage = TRUE; 122 121 123 strcpy(szFileName, pszFileName); 122 124 strupr(szFileName); … … 624 626 //they get TLS index 0 for their main executable 625 627 { 626 USHORT sel = SetWin32TIB( );628 USHORT sel = SetWin32TIB(TIB_SWITCH_FORCE_WIN32); 627 629 tlsAlloc(); 628 630 tlsAttachThread(); //setup TLS (main thread) -
trunk/src/kernel32/wprocess.cpp
r7794 r7811 1 /* $Id: wprocess.cpp,v 1.14 2 2002-02-02 14:19:01sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.143 2002-02-06 16:33:40 sandervl Exp $ */ 2 2 3 3 /* … … 372 372 } 373 373 /******************************************************************************/ 374 //Switch to WIN32 TIB (FS selector) 375 //NOTE: This is not done for Odin32 applications (LX), unless 376 // fForceSwitch is TRUE) 374 377 /******************************************************************************/ 375 USHORT WIN32API SetWin32TIB( )378 USHORT WIN32API SetWin32TIB(BOOL fForceSwitch) 376 379 { 377 380 SHORT win32tibsel; … … 380 383 //If we're running an Odin32 OS/2 application (not converted!), then we 381 384 //we don't switch FS selectors 382 if(fIsOS2Image ) {385 if(fIsOS2Image && !fForceSwitch) { 383 386 return GetFS(); 384 387 }
Note:
See TracChangeset
for help on using the changeset viewer.