diff --git a/reactos/lib/kernel32/mem/section.c b/reactos/lib/kernel32/mem/section.c index 6b92da7e3c8..ad3d15c9655 100644 --- a/reactos/lib/kernel32/mem/section.c +++ b/reactos/lib/kernel32/mem/section.c @@ -1,4 +1,4 @@ -/* $Id: section.c,v 1.5 1999/10/07 23:44:28 ekohl Exp $ +/* $Id: section.c,v 1.6 1999/11/17 21:20:15 ariadne Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -284,4 +284,28 @@ OpenFileMappingW ( return SectionHandle; } +WINBOOL +STDCALL +FlushViewOfFile( + LPCVOID lpBaseAddress, + DWORD dwNumberOfBytesToFlush + ) +{ + + NTSTATUS Status; + ULONG NumberOfBytesFlushed; + + Status = NtFlushVirtualMemory(NtCurrentProcess(), + lpBaseAddress, dwNumberOfBytesToFlush, + &NumberOfBytesFlushed + ); + + if (!NT_SUCCESS(Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + return FALSE; + } + return TRUE; +} + /* EOF */