- Timestamp:
- Aug 25, 1999, 1:40:18 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/makefile
r678 r684 1 # $Id: makefile,v 1.3 0 1999-08-25 10:28:40sandervl Exp $1 # $Id: makefile,v 1.31 1999-08-25 11:40:18 sandervl Exp $ 2 2 3 3 # … … 305 305 $(PDWIN32_INCLUDE)\unicode.h 306 306 307 virtual.obj: virtual.cpp $(PDWIN32_INCLUDE)\win\virtual.h $(PDWIN32_INCLUDE)\handlemanager.h 307 virtual.obj: virtual.cpp $(PDWIN32_INCLUDE)\win\virtual.h $(PDWIN32_INCLUDE)\handlemanager.h mmap.h 308 308 mmap.obj: mmap.cpp mmap.h $(PDWIN32_INCLUDE)\vmutex.h 309 309 -
trunk/src/kernel32/mmap.cpp
r678 r684 1 /* $Id: mmap.cpp,v 1. 9 1999-08-25 10:28:40sandervl Exp $ */1 /* $Id: mmap.cpp,v 1.10 1999-08-25 11:40:18 sandervl Exp $ */ 2 2 3 3 /* … … 254 254 goto parmfail; 255 255 256 if(cbFlush == 0) 257 cbFlush = mSize; 258 256 259 if(lpvBase < pMapping || (ULONG)lpvBase+cbFlush > (ULONG)pMapping+mSize) 257 260 goto parmfail; … … 259 262 if(mProtFlags & PAGE_READONLY) 260 263 goto parmfail; 264 265 if(hMemFile == -1) 266 goto success; //TODO: Return an error here? 261 267 262 268 nrpages = cbFlush/PAGE_SIZE; … … 293 299 } 294 300 } 301 success: 295 302 // mapMutex.leave(); 296 303 return TRUE; -
trunk/src/kernel32/virtual.cpp
r678 r684 1 /* $Id: virtual.cpp,v 1. 4 1999-08-25 10:28:41sandervl Exp $ */1 /* $Id: virtual.cpp,v 1.5 1999-08-25 11:40:18 sandervl Exp $ */ 2 2 3 3 /* … … 20 20 #include <heapstring.h> 21 21 #include <handlemanager.h> 22 #include "mmap.h" 22 23 23 24 /*********************************************************************** … … 144 145 ) 145 146 { 146 dprintf(("FlushViewOfFile: NOT IMPLEMENTED")); 147 return TRUE; 147 Win32MemMap *map; 148 149 if (!base) 150 { 151 SetLastError( ERROR_INVALID_PARAMETER ); 152 return FALSE; 153 } 154 map = Win32MemMap::findMap((ULONG)base); 155 if(map == NULL) { 156 SetLastError( ERROR_FILE_NOT_FOUND ); 157 return FALSE; 158 } 159 return map->flushView((LPVOID)base, cbFlush); 148 160 } 149 161 … … 163 175 ) 164 176 { 177 Win32MemMap *map; 178 165 179 if (!addr) 166 180 { … … 168 182 return FALSE; 169 183 } 170 return TRUE; 184 map = Win32MemMap::findMap((ULONG)addr); 185 if(map == NULL) { 186 SetLastError( ERROR_FILE_NOT_FOUND ); 187 return FALSE; 188 } 189 return map->unmapViewOfFile(); 171 190 } 172 191
Note:
See TracChangeset
for help on using the changeset viewer.