Changeset 5011 for trunk/src/kernel32/hmmmap.cpp
- Timestamp:
- Jan 22, 2001, 7:26:52 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmmmap.cpp
r4230 r5011 1 /* $Id: hmmmap.cpp,v 1.1 5 2000-09-10 21:54:06sandervl Exp $ */1 /* $Id: hmmmap.cpp,v 1.16 2001-01-22 18:26:51 sandervl Exp $ */ 2 2 3 3 /* … … 56 56 DWORD size_high, /* [in] High-order 32 bits of object size */ 57 57 DWORD size_low, /* [in] Low-order 32 bits of object size */ 58 LPCSTR name, /* [in] Name of file-mapping object */ 59 HFILE *hOldMap) // if create an existing memmap, return handle of old one 58 LPCSTR name) /* [in] Name of file-mapping object */ 60 59 { 61 60 Win32MemMap *map; … … 95 94 //Is it allowed to open an existing view with different flags? 96 95 //(i.e. write access to readonly object) 97 //Return handle of existing file mapping 98 dprintf(("CreateFileMapping: Return handle of existing file mapping %s", name)); 96 dprintf(("CreateFileMapping: duplicate handle of existing file mapping %s", name)); 97 98 //if map already exists, we must create a new handle to the existing 99 //map object and return ERROR_ALREADY_EXISTS 99 100 map->AddRef(); 100 *hOldMap = map->getMapHandle(); 101 return ERROR_ALREADY_EXISTS; 101 pHMHandleData->dwUserData = (ULONG)map; 102 pHMHandleData->dwInternalType = HMTYPE_MEMMAP; 103 return ERROR_ALREADY_EXISTS; 102 104 } 103 105 else { … … 109 111 } 110 112 111 if(map->Init( pHMHandleData->hHMHandle) == FALSE) {113 if(map->Init() == FALSE) { 112 114 dprintf(("CreateFileMappingA: init failed!")); 113 115 delete map; … … 218 220 //view of the file is unmapped. 219 221 map = (Win32MemMap *)pHMHandleData->dwUserData; 220 map-> close();222 map->Release(); 221 223 222 224 return NO_ERROR;
Note:
See TracChangeset
for help on using the changeset viewer.