Changeset 1325 for trunk/src/kernel32/windllpe2lx.cpp
- Timestamp:
- Oct 17, 1999, 3:49:09 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/windllpe2lx.cpp
r1274 r1325 1 /* $Id: windllpe2lx.cpp,v 1. 2 1999-10-14 01:37:55bird Exp $ */1 /* $Id: windllpe2lx.cpp,v 1.3 1999-10-17 01:49:08 bird Exp $ */ 2 2 3 3 /* … … 88 88 89 89 /* Try create pe2lx dll object. */ 90 try 90 pWinMod = new Win32Pe2LxDll(hinstance, (ulPe2LxVersion & 0x80000000UL) == 0x80000000UL); 91 if (pWinMod == NULL) 91 92 { 92 pWinMod = new Win32Pe2LxDll(hinstance, (ulPe2LxVersion & 0x80000000UL) == 0x80000000UL); 93 if (pWinMod == NULL) 94 throw ((ULONG)ERROR_NOT_ENOUGH_MEMORY); 95 96 /* @@@PH 1998/03/17 Console devices initialization */ 97 iConsoleDevicesRegister(); 98 99 /* Add reference and attach dll to process. */ 100 pWinMod->AddRef(); 101 pWinMod->attachProcess(); 93 eprintf(("RegisterPe2LxDll: new returned a NULL-pointer\n")); 94 return 0; 102 95 } 103 catch(ULONG ul)96 if (!pWinMod->init()) 104 97 { 105 eprintf(("RegisterPe2LxD LL: Failed to create module object, ul=%d\n", ul));106 DebugInt3();107 return 0; /* fail dll load */98 eprintf(("RegisterPe2LxDll: init-method failed.\n")); 99 delete pWinMod; 100 return 0; 108 101 } 102 103 /* @@@PH 1998/03/17 Console devices initialization */ 104 iConsoleDevicesRegister(); 105 106 /* Add reference and attach dll to process. */ 107 pWinMod->AddRef(); 108 pWinMod->attachProcess(); 109 109 } 110 110 else … … 112 112 if (pWinMod != NULL && !fFreeLibrary) 113 113 return 0; /* don't unload (OS/2 dll unload bug) - see OS2.bugs in root dir. */ 114 115 #if 0 /* Runtime environment could already be gone, so don't do this */116 dprintf(("KERNEL32: Dll Removed by FreeLibrary or ExitProcess\n"));117 #endif118 114 } 119 115 … … 130 126 * @author Sander van Leeuwen, knut st. osmundsen 131 127 */ 132 Win32Pe2LxDll::Win32Pe2LxDll(HINSTANCE hinstance, BOOL fWin32k) throw(ULONG)128 Win32Pe2LxDll::Win32Pe2LxDll(HINSTANCE hinstance, BOOL fWin32k) 133 129 : Win32ImageBase(hinstance), 134 130 Win32DllBase(hinstance, NULL), … … 136 132 { 137 133 dprintf(("Win32Pe2LxDll::Win32Pe2LxDll %s", szModule)); 138 /* set entry point. */139 dllEntryPoint = (WIN32DLLENTRY)entryPoint;140 134 } 141 135 … … 151 145 } 152 146 147 148 /** 149 * Init object. 150 * Must be called immedeately after objecte construction. 151 * @returns Success indicator. (TRUE == success) 152 * @sketch call init method of the parten class. 153 * set dllEntryPoint 154 * @status completely implemented. 155 * @author knut st. osmundsen 156 */ 157 BOOL Win32Pe2LxDll::init() 158 { 159 if (Win32Pe2LxImage::init()) 160 { 161 /* set entry point. */ 162 dllEntryPoint = (WIN32DLLENTRY)entryPoint; 163 } 164 else 165 return FALSE; 166 return TRUE; 167 } 153 168 154 169 /**
Note:
See TracChangeset
for help on using the changeset viewer.