Ignore:
Timestamp:
Jul 24, 2002, 1:29:23 PM (23 years ago)
Author:
sandervl
Message:

bugfix for pe offset when mapping view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winimagepeldr.cpp

    r8913 r8914  
    1 /* $Id: winimagepeldr.cpp,v 1.99 2002-07-23 13:51:49 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.100 2002-07-24 11:29:23 sandervl Exp $ */
    22
    33/*
     
    195195             szFileName,
    196196             hFile));
     197
     198    //change to PE image start if necessary
     199    if(ulPEOffset) {
     200        if(OSLibDosSetFilePtr(hFile, ulPEOffset, OSLIB_SETPTR_FILE_BEGIN) == -1) {
     201            goto failure;
     202        }
     203    }
    197204 
    198205    //default error:
     
    241248        goto failure;
    242249    }
    243     //PE image starts at offset ulPEOffset (default 0)
    244     win32file = memmap->mapViewOfFile(0, ulPEOffset, 2);
     250    win32file = memmap->mapViewOfFile(0, 0, 2);
    245251
    246252    if(DosQueryPathInfo(szFileName, FIL_QUERYFULLNAME, szFullPath, sizeof(szFullPath)) == 0) {
Note: See TracChangeset for help on using the changeset viewer.