Changeset 21649 for trunk/src/kernel32/initkernel32.cpp
- Timestamp:
- Jun 23, 2011, 2:02:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/initkernel32.cpp
r21626 r21649 112 112 /*-------------------------------------------------------------------------*/ 113 113 114 if(fInit == TRUE && ulFlag == 0) {115 return 1; //already initialized116 }117 fInit = TRUE;118 119 114 switch (ulFlag) 120 115 { 121 case 0 116 case 0: 122 117 { 118 if (fInit) 119 return 1; // already initialized 120 123 121 // This always must be the first thing to do. 124 122 RasInitialize (hModule); … … 257 255 RasEntry (RAS_EVENT_Kernel32InitComplete, &dllHandle, sizeof (dllHandle)); 258 256 257 fInit = TRUE; 258 259 259 break; 260 260 } 261 261 262 case 1 262 case 1: 263 263 if (dllHandle) 264 264 { … … 267 267 break; 268 268 269 default 270 return 0 UL;269 default: 270 return 0; 271 271 } 272 272 … … 280 280 void APIENTRY cleanupKernel32(ULONG ulReason) 281 281 { 282 dprintf(("kernel32 exit %d\n", ulReason)); 282 if (!fInit) 283 { 284 // The initialization sequence was not complete; attempting to 285 // uninitialize some things may crash (yeah, dirty code that doesn't 286 // analyze its own state) 287 return; 288 } 289 290 dprintf(("kernel32 exit %d", ulReason)); 283 291 284 292 TEB *teb = GetThreadTEB();
Note:
See TracChangeset
for help on using the changeset viewer.