Ignore:
Timestamp:
May 6, 2003, 2:06:11 PM (22 years ago)
Author:
sandervl
Message:

Fixed closing of parent file handle by duplicate memory map; Compare file names instead of handles when checking for duplicate file maps

File:
1 edited

Legend:

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

    r9971 r10073  
    1 /* $Id: mmapdup.cpp,v 1.2 2003-04-02 11:03:32 sandervl Exp $ */
     1/* $Id: mmapdup.cpp,v 1.3 2003-05-06 12:06:11 sandervl Exp $ */
    22
    33/*
     
    6767{
    6868    //copy values from original map
    69     mSize    = parent->getMapSize();
    70     hMemFile = parent->getFileHandle();
     69    mSize       = parent->getMapSize();
     70    //can't use hMemFile or else we'll close this file handle in the memmap dtor!!
     71    hDupMemFile = parent->getFileHandle();
    7172
    7273    //If the parent is a readonly map and we allow write access, then we must
     
    127128             goto parmfail;
    128129
    129     if(offset+size > mSize && (!(fdwAccess & FILE_MAP_WRITE) || hMemFile == -1))
     130    if(offset+size > mSize && (!(fdwAccess & FILE_MAP_WRITE) || hDupMemFile == -1))
    130131        goto parmfail;
    131132
Note: See TracChangeset for help on using the changeset viewer.