Changeset 6211 for trunk/src/kernel32/winexepe2lx.cpp
- Timestamp:
- Jul 8, 2001, 4:49:47 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winexepe2lx.cpp
r5327 r6211 1 /* $Id: winexepe2lx.cpp,v 1. 9 2001-03-19 14:49:22bird Exp $ */1 /* $Id: winexepe2lx.cpp,v 1.10 2001-07-08 02:49:47 bird Exp $ */ 2 2 3 3 /* … … 26 26 #include <misc.h> 27 27 #include <win32type.h> 28 #include <winexepe2lx.h> 28 #include <win32k.h> 29 #include "winexepe2lx.h" 29 30 30 31 #include "cio.h" // I/O … … 35 36 #define DBG_LOCALLOG DBG_winexepe2lx 36 37 #include "dbglocal.h" 38 39 40 /******************************************************************************* 41 * Global Variables * 42 *******************************************************************************/ 43 BOOL Win32Pe2LxExe::fEarlyInit = FALSE; 37 44 38 45 … … 64 71 CheckVersion(ulPe2LxVersion & ~0x80000000UL, OSLibGetDllName(hinstance)); 65 72 66 /* Frees WinExe if is not NULL - should never happen! */67 if (WinExe != NULL)68 {69 dprintf(("RegisterPe2LxExe: WinExe != NULL\n"));70 delete(WinExe);71 }72 73 73 /* Write info to the log. */ 74 74 dprintf(("RegisterPe2LxExe: ulPe2LxVersion = %#x\n", ulPe2LxVersion)); … … 77 77 dprintf(("RegisterPe2LxExe: name = %s\n", OSLibGetDllName(hinstance))); 78 78 79 /* Create Pe2Lx Exe object. */ 80 pWinPe2LxExe = new Win32Pe2LxExe(hinstance, (ulPe2LxVersion & 0x80000000UL) == 0x80000000UL); 81 if (pWinPe2LxExe == NULL) 82 { 83 eprintf(("RegisterPe2LxExe: new returned a NULL-pointer\n")); 84 return; 85 } 86 if (!pWinPe2LxExe->init()) 87 { 88 eprintf(("RegisterPe2LxExe: init-method failed.\n")); 89 delete pWinPe2LxExe; 90 return; 91 } 79 /* Might allready be initiated because of early init. */ 80 if ( WinExe != NULL 81 && ( (ulPe2LxVersion & 0x80000000UL) != 0x80000000UL) 82 || !Win32Pe2LxExe::fEarlyInit) 83 { 84 delete WinExe; 85 WinExe = NULL; 86 } 87 88 if (WinExe == NULL) 89 { 90 /* Create Pe2Lx Exe object. */ 91 pWinPe2LxExe = new Win32Pe2LxExe(hinstance, (ulPe2LxVersion & 0x80000000UL) == 0x80000000UL); 92 if (pWinPe2LxExe == NULL) 93 { 94 eprintf(("RegisterPe2LxExe: new returned a NULL-pointer\n")); 95 return; 96 } 97 if (!pWinPe2LxExe->init()) 98 { 99 eprintf(("RegisterPe2LxExe: init-method failed.\n")); 100 delete pWinPe2LxExe; 101 return; 102 } 103 } 104 else 105 pWinPe2LxExe = (Win32Pe2LxExe*)WinExe; 92 106 93 107 /* Call start (which calls the entry point). */ … … 156 170 } 157 171 172 173 174 /** 175 * Preinitiate the executable before RegisterPe2LxExe is called. 176 * This is done by the first Pe2Lx DLL which is loaded. 177 * 178 * @returns Success idicator. 179 * @status 180 * @author knut st. osmundsen (kosmunds@csc.no) 181 * @remark 182 */ 183 BOOL Win32Pe2LxExe::earlyInit() 184 { 185 /* 186 * Try make an win32k loaded executable object. 187 */ 188 Win32Pe2LxExe * pExe = new Win32Pe2LxExe((HINSTANCE)OSLibGetPIB(PIB_TASKHNDL), libWin32kInstalled()); 189 if (pExe) 190 { 191 if (pExe->init()) 192 { 193 WinExe = pExe; 194 return fEarlyInit = TRUE; 195 } 196 } 197 198 return FALSE; 199 } 200
Note:
See TracChangeset
for help on using the changeset viewer.