Changeset 9537 for trunk/src/kernel32/winimagepe2lx.cpp
- Timestamp:
- Dec 20, 2002, 12:39:43 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepe2lx.cpp
r8589 r9537 1 /* $Id: winimagepe2lx.cpp,v 1.2 0 2002-06-08 00:26:59 birdExp $ */1 /* $Id: winimagepe2lx.cpp,v 1.21 2002-12-20 11:39:42 sandervl Exp $ */ 2 2 3 3 /* … … 179 179 * Initiates the object. 180 180 * Must be called immediately after the object construction. 181 * @returns Success indicator, TRUE == success; FALSE = failure.181 * @returns Error value, LDRERROR_SUCCESS == success; failure otherwise. 182 182 * @sketch Get section placement and sizes for this module. (paSections, cSections) 183 183 * Verify that there is at least one section - the header section. … … 194 194 * @remark Object must be destroyed if failure! 195 195 */ 196 BOOLWin32Pe2LxImage::init()196 DWORD Win32Pe2LxImage::init() 197 197 { 198 198 APIRET rc; … … 204 204 dprintf(("Win32Pe2LxImage::Win32Pe2LxImage: error - getSection failed with rc=%d\n", 205 205 rc)); 206 return FALSE;206 return LDRERROR_INVALID_HEADER; 207 207 } 208 208 … … 211 211 { 212 212 dprintf(("Win32Pe2LxImage::Win32Pe2LxImage: no header section, cSections is 0\n")); 213 return FALSE;213 return LDRERROR_INVALID_HEADER; 214 214 } 215 215 … … 224 224 { 225 225 dprintf(("Win32Pe2LxImage::Win32Pe2LxImage: Not a pe2lx image!(?)\n")); 226 return FALSE;226 return LDRERROR_INVALID_HEADER; 227 227 } 228 228 … … 245 245 { 246 246 dprintf(("Win32Pe2LxImage::Win32Pe2LxImage: Not a pe2lx image!(?)\n")); 247 return FALSE;247 return LDRERROR_INVALID_HEADER; 248 248 } 249 249 … … 253 253 { 254 254 dprintf(("Win32Pe2LxImage::Win32Pe2LxImage: setSectionRVAs failed with rc=%d\n", rc)); 255 return FALSE;255 return LDRERROR_INVALID_HEADER; 256 256 } 257 257 … … 268 268 dprintf(("Win32Pe2LxImage::Win32Pe2LxImage: entrypoint is incorrect, AddrOfEP=0x%08x, entryPoint=0x%08x\n", 269 269 pNtHdrs->OptionalHeader.AddressOfEntryPoint, entryPoint)); 270 return FALSE;270 return LDRERROR_NO_ENTRYPOINT; 271 271 } 272 272 … … 367 367 eprintf(("Win32Pe2LxImage::init: invalid RVA to TLS AddressOfIndex - %#8x.\n", 368 368 pTLSDir->AddressOfIndex)); 369 return FALSE;369 return LDRERROR_INVALID_HEADER; 370 370 } 371 371 setTLSIndexAddr((LPDWORD)pv); … … 387 387 eprintf(("Win32Pe2LxImage::init: invalid pointer to TLS AddressOfCallBacks - %#8x.\n", 388 388 pTLSDir->AddressOfIndex)); 389 return FALSE;389 return LDRERROR_INVALID_HEADER; 390 390 } 391 391 setTLSCallBackAddr((PIMAGE_TLS_CALLBACK*)pv); … … 398 398 eprintf(("Win32Pe2LxImage::init: invalid RVA to TLS Dir - %#8x. (getPointerFromRVA failed)\n", 399 399 pNtHdrs->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS].VirtualAddress)); 400 return FALSE;400 return LDRERROR_INVALID_HEADER; 401 401 } 402 402 } 403 return TRUE;403 return LDRERROR_SUCCESS; 404 404 } 405 405
Note:
See TracChangeset
for help on using the changeset viewer.