Ignore:
Timestamp:
Dec 10, 1999, 3:06:12 PM (26 years ago)
Author:
sandervl
Message:

Memory map fixes

File:
1 edited

Legend:

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

    r1858 r2053  
    1 /* $Id: HandleManager.cpp,v 1.28 1999-11-27 12:48:25 achimha Exp $ */
     1/* $Id: HandleManager.cpp,v 1.29 1999-12-10 14:06:10 sandervl Exp $ */
    22
    33/*
     
    22982298  PHMHANDLEDATA   pHMHandleData;
    22992299  DWORD           rc;                                     /* API return code */
    2300 
     2300  HANDLE          hOldMemMap = -1;
    23012301
    23022302  pDeviceHandler = HMGlobals.pHMFileMapping;         /* device is predefined */
     
    23372337                                         dwMaximumSizeHigh,
    23382338                                         dwMaximumSizeLow,
    2339                                          lpName);
     2339                                         lpName, &hOldMemMap);
    23402340
    23412341  if (rc != NO_ERROR)     /* oops, creation failed within the device handler */
    23422342  {
    2343     TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
    2344     SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
    2345     return (NULL);                                           /* signal error */
     2343        TabWin32Handles[iIndexNew].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     2344        SetLastError(rc);          /* Hehe, OS/2 and NT are pretty compatible :) */
     2345        if(rc == ERROR_ALREADY_EXISTS) {
     2346                return hOldMemMap; //return handle of existing file mapping
     2347        }
     2348        else    return (NULL);                                           /* signal error */
    23462349  }
    23472350  else
Note: See TracChangeset for help on using the changeset viewer.