- Timestamp:
- Jun 23, 2011, 2:02:58 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NTDLL/initntdll.c
r21584 r21649 54 54 55 55 //Initialize kernel32 first (circular dependency between kernel32 & ntdll) 56 InitializeKernel32(); 56 if (InitializeKernel32() == 0) 57 return 0; 57 58 58 59 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ -
trunk/src/crypt32/initcrypt32.cpp
r21311 r21649 88 88 case 0 : 89 89 90 InitializeKernel32(); 90 if (InitializeKernel32() == 0) 91 return 0; 92 91 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 92 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&crypt32_PEResTab); -
trunk/src/gdi32/initgdi32.cpp
r21304 r21649 99 99 ParseLogStatusGDI32(); 100 100 101 InitializeKernel32(); 101 if (InitializeKernel32() == 0) 102 return 0; 103 102 104 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 103 105 if(InitRegionSpace() == FALSE) { -
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(); -
trunk/src/kernel32/initterm.cpp
r21426 r21649 95 95 /*-------------------------------------------------------------------------*/ 96 96 97 if(fInit == TRUE && ulFlag == 0) {98 return 1; //already initialized99 }100 101 97 switch (ulFlag) 102 98 { 103 case 0 99 case 0: 104 100 { 101 if (fInit) 102 return 1; // already initialized 103 105 104 ctordtorInit(); 106 105 … … 112 111 rc = DosExitList(EXITLIST_KERNEL32|EXLST_ADD, cleanup); 113 112 if (rc) 114 return 0 UL;113 return 0; 115 114 116 rc = DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_VERSION_MINOR, version, sizeof(version)); 117 if(rc == 0){ 118 if(version[0] >= 20 && version[1] <= 30) { 115 rc = DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_VERSION_MINOR, 116 version, sizeof(version)); 117 if (rc == 0) 118 if(version[0] >= 20 && version[1] <= 30) 119 119 fVersionWarp3 = TRUE; 120 }121 }122 120 123 121 rc = inittermKernel32(hModule, ulFlag); … … 125 123 } 126 124 127 case 1 125 case 1: 128 126 rc = inittermKernel32(hModule, ulFlag); 129 127 break; 130 128 131 default 132 return 0 UL;129 default: 130 return 0; 133 131 } 134 132 … … 156 154 HMODULE hModule; 157 155 158 if (!fInit) {156 if (!fInit) 159 157 loadNr = globLoadNr++; 160 } 161 DosQueryModuleHandleStrict("WGSS50", &hModule); 162 _O32__DLL_InitTerm(hModule, 0); 163 DosQueryModuleHandleStrict("KERNEL32", &hModule); 164 return DLLENTRYPOINT_NAME(hModule, 0); 158 159 if (DosQueryModuleHandleStrict("WGSS50", &hModule) == NO_ERROR) 160 if (_O32__DLL_InitTerm(hModule, 0) != 0) 161 if (DosQueryModuleHandleStrict("KERNEL32", &hModule) == NO_ERROR) 162 return DLLENTRYPOINT_NAME(hModule, 0); 163 164 return 0; // failure 165 165 } 166 166 //****************************************************************************** -
trunk/src/mscms/initmscms.cpp
r21311 r21649 88 88 case 0 : 89 89 90 InitializeKernel32(); 90 if (InitializeKernel32() == 0) 91 return 0; 92 91 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 92 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); -
trunk/src/oleacc/initoleacc.cpp
r21313 r21649 88 88 case 0 : 89 89 90 InitializeKernel32(); 90 if (InitializeKernel32() == 0) 91 return 0; 92 91 93 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 92 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&oleacc_PEResTab); -
trunk/src/rsaenh/initrsaenh.cpp
r21363 r21649 88 88 case 0 : 89 89 90 InitializeKernel32(); 90 if (InitializeKernel32() == 0) 91 return 0; 92 91 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 92 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); -
trunk/src/schannel/initschannel.cpp
r21373 r21649 88 88 case 0 : 89 89 90 InitializeKernel32(); 90 if (InitializeKernel32() == 0) 91 return 0; 92 91 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 92 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); -
trunk/src/secur32/initsecur32.cpp
r21364 r21649 88 88 case 0 : 89 89 90 InitializeKernel32(); 90 if (InitializeKernel32() == 0) 91 return 0; 92 91 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 92 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); -
trunk/src/user32/controls/initodinctrl.cpp
r8543 r21649 67 67 ParseLogStatusOdinCtrl(); 68 68 69 InitializeKernel32(); 69 if (InitializeKernel32() == 0) 70 return 0; 71 70 72 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 71 73 break; 72 74 73 75 case 1 : 74 76 break; -
trunk/src/user32/inituser32.cpp
r21595 r21649 174 174 ParseLogStatusUSER32(); 175 175 176 InitializeKernel32(); 176 if (InitializeKernel32() == 0) 177 return 0; 178 177 179 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 178 180
Note:
See TracChangeset
for help on using the changeset viewer.