Changeset 1670 for trunk/src/kernel32/windllbase.cpp
- Timestamp:
- Nov 9, 1999, 8:22:33 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/windllbase.cpp
r1663 r1670 1 /* $Id: windllbase.cpp,v 1. 3 1999-11-09 14:19:47sandervl Exp $ */1 /* $Id: windllbase.cpp,v 1.4 1999-11-09 19:22:32 sandervl Exp $ */ 2 2 3 3 /* … … 102 102 WINEXCEPTION_FRAME exceptFrame; 103 103 USHORT sel; 104 BOOL rc; 104 THDB *thdb; 105 BOOL rc, fSetExceptionHandler; 105 106 106 107 if(fAttachedToProcess) … … 108 109 109 110 fAttachedToProcess = TRUE; 111 112 thdb = GetThreadTHDB(); 113 fSetExceptionHandler = (!thdb || thdb->teb_sel != GetFS()); 114 115 //Note: The Win32 exception structure references by FS:[0] is the same 116 // in OS/2 117 if(fSetExceptionHandler) { 118 OS2SetExceptionHandler((void *)&exceptFrame); 119 sel = SetWin32TIB(); 120 } 110 121 111 122 //Allocate TLS index for this module … … 115 126 if(fSkipEntryCalls || dllEntryPoint == NULL) { 116 127 dprintf(("attachProcess not required for dll %s", szModule)); 128 if(fSetExceptionHandler) { 129 SetFS(sel); 130 OS2UnsetExceptionHandler((void *)&exceptFrame); 131 } 117 132 return(TRUE); 118 133 } … … 120 135 dprintf(("attachProcess to dll %s", szModule)); 121 136 122 //Note: The Win32 exception structure references by FS:[0] is the same123 // in OS/2124 OS2SetExceptionHandler((void *)&exceptFrame);125 126 sel = SetWin32TIB();127 137 rc = dllEntryPoint(hinstance, DLL_PROCESS_ATTACH, 0); 128 SetFS(sel); 129 130 OS2UnsetExceptionHandler((void *)&exceptFrame); 131 138 139 dprintf(("attachProcess to dll %s DONE", szModule)); 140 141 if(fSetExceptionHandler) { 142 SetFS(sel); 143 OS2UnsetExceptionHandler((void *)&exceptFrame); 144 } 132 145 return rc; 133 146 } … … 174 187 175 188 dprintf(("attachThread to dll %s", szModule)); 176 //Note: The Win32 exception structure references by FS:[0] is the same177 // in OS/2178 OS2SetExceptionHandler((void *)&exceptFrame);179 189 180 190 rc = dllEntryPoint(hinstance, DLL_THREAD_ATTACH, 0); 181 191 182 OS2UnsetExceptionHandler((void *)&exceptFrame); 192 dprintf(("attachThread to dll %s DONE", szModule)); 193 183 194 return rc; 184 195 } … … 195 206 dprintf(("attachThread from dll %s", szModule)); 196 207 197 //Note: The Win32 exception structure references by FS:[0] is the same198 // in OS/2199 OS2SetExceptionHandler((void *)&exceptFrame);200 201 208 rc = dllEntryPoint(hinstance, DLL_THREAD_DETACH, 0); 202 203 OS2UnsetExceptionHandler((void *)&exceptFrame);204 209 return rc; 205 210 }
Note:
See TracChangeset
for help on using the changeset viewer.