Changeset 3872 for trunk/src


Ignore:
Timestamp:
Jul 20, 2000, 8:07:00 PM (25 years ago)
Author:
sandervl
Message:

Always try to allocate an executable image at it's preferred address

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.CPP

    r3804 r3872  
    1 /* $Id: KERNEL32.CPP,v 1.49 2000-07-06 21:18:38 sandervl Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.50 2000-07-20 18:06:58 sandervl Exp $ */
    22
    33/*
     
    707707
    708708
    709 ODINFUNCTION4(BOOL,    GetStringTypeW,
    710               DWORD,   dwInfoType,
    711               LPCWSTR, lpSrcStr,
    712               int,     cchSrc,
    713               LPWORD,  lpCharType)
    714 {
    715   return GetStringTypeExW(0,
    716                           dwInfoType,
    717                           lpSrcStr,
    718                           cchSrc,
    719                           lpCharType);
    720 }
    721 
    722709
    723710ODINFUNCTION5(BOOL,    GetStringTypeExW,
     
    771758}
    772759
    773 //******************************************************************************
    774 //NOTE: This has one parameter more than the W version! (@#$@#$)
    775 //******************************************************************************
    776 ODINFUNCTION5(BOOL,    GetStringTypeA,
    777               LCID,    locale,
     760ODINFUNCTION4(BOOL,    GetStringTypeW,
    778761              DWORD,   dwInfoType,
    779               LPCSTR, lpSrcStr,
     762              LPCWSTR, lpSrcStr,
    780763              int,     cchSrc,
    781764              LPWORD,  lpCharType)
    782765{
    783   return GetStringTypeExA(locale,
     766  return ODIN_GetStringTypeExW(0,
    784767                          dwInfoType,
    785768                          lpSrcStr,
     
    854837}
    855838
     839//******************************************************************************
     840//NOTE: This has one parameter more than the W version! (@#$@#$)
     841//******************************************************************************
     842ODINFUNCTION5(BOOL,    GetStringTypeA,
     843              LCID,    locale,
     844              DWORD,   dwInfoType,
     845              LPCSTR,  lpSrcStr,
     846              int,     cchSrc,
     847              LPWORD,  lpCharType)
     848{
     849  return ODIN_GetStringTypeExA(locale,
     850                          dwInfoType,
     851                          lpSrcStr,
     852                          cchSrc,
     853                          lpCharType);
     854}
    856855
    857856//******************************************************************************
  • trunk/src/kernel32/exceptions.cpp

    r3547 r3872  
    1 /* $Id: exceptions.cpp,v 1.41 2000-05-18 09:08:37 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.42 2000-07-20 18:06:59 sandervl Exp $ */
    22
    33/*
     
    310310  if(!pRecord)
    311311  {
    312     record.ExceptionCode    = STATUS_INVALID_DISPOSITION;
     312    record.ExceptionCode    = STATUS_UNWIND;
    313313    record.ExceptionFlags   = 0;
    314314    record.ExceptionRecord  = NULL;
  • trunk/src/kernel32/winimagepeldr.cpp

    r3765 r3872  
    1 /* $Id: winimagepeldr.cpp,v 1.49 2000-06-28 18:08:36 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.50 2000-07-20 18:07:00 sandervl Exp $ */
    22
    33/*
     
    676676 ULONG  baseAddress;
    677677
     678  realBaseAddress = 0;
     679
     680  //Allocated in peldr.dll
     681  if(reservedMem && reservedMem == oh.ImageBase) {
     682        realBaseAddress = oh.ImageBase;
     683        return TRUE;
     684  }
     685
    678686  //SvL: We don't care where the image is loaded for resource lookup
    679687  if(fh.Characteristics & IMAGE_FILE_RELOCS_STRIPPED && loadType == REAL_LOAD) {
     
    755763 APIRET rc;
    756764 BOOL   allocFlags = flAllocMem;
    757 
    758   realBaseAddress = 0;
    759 
    760   //Allocated in peldr.dll
    761   if(reservedMem && reservedMem == oh.ImageBase) {
    762         realBaseAddress = oh.ImageBase;
    763         return TRUE;
    764   }
    765765
    766766  //Reserve enough space to store 4096 pointers to 1MB memory chunks
  • trunk/src/peldr/pe.cpp

    r3827 r3872  
    1 /* $Id: pe.cpp,v 1.19 2000-07-15 17:12:02 sandervl Exp $ */
     1/* $Id: pe.cpp,v 1.20 2000-07-20 18:06:29 sandervl Exp $ */
    22
    33/*
     
    272272        goto end;
    273273  }
    274   if(!(fh.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)) {
    275         goto end; //no need to allocate anything now
    276   }
     274//  if(!(fh.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)) {
     275//      goto end; //no need to allocate anything now
     276//  }
    277277
    278278  // check for high memory support
Note: See TracChangeset for help on using the changeset viewer.