Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/memory.c | 9 +++++++++ include/winbase.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index bc5913b6d7d..ca339181e32 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1557,6 +1557,7 @@ @ stdcall -import UnlockFile(long long long long long) @ stdcall -import UnlockFileEx(long long long long ptr) @ stdcall -import UnmapViewOfFile(ptr) +@ stdcall -import UnmapViewOfFileEx(ptr long) # @ stub UnregisterApplicationRecoveryCallback @ stdcall UnregisterApplicationRestart() # @ stub UnregisterConsoleIME diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 854797ddeb0..791c3603918 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1654,7 +1654,7 @@ @ stdcall UnlockFileEx(long long long long ptr) @ stdcall UnmapViewOfFile(ptr) @ stdcall UnmapViewOfFile2(long ptr long) -# @ stub UnmapViewOfFileEx +@ stdcall UnmapViewOfFileEx(ptr long) # @ stub UnregisterBadMemoryNotification # @ stub UnregisterGPNotificationInternal # @ stub UnregisterStateChangeNotification diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c index 87c07887482..35e6d4e3b8c 100644 --- a/dlls/kernelbase/memory.c +++ b/dlls/kernelbase/memory.c @@ -312,6 +312,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH UnmapViewOfFile2( HANDLE process, void *addr, ULON }
+/*********************************************************************** + * UnmapViewOfFileEx (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH UnmapViewOfFileEx( void *addr, ULONG flags ) +{ + return set_ntstatus( NtUnmapViewOfSectionEx( GetCurrentProcess(), addr, flags )); +} + + /*********************************************************************** * VirtualAlloc (kernelbase.@) */ diff --git a/include/winbase.h b/include/winbase.h index 2b109af19df..9fbaa466b54 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2742,6 +2742,7 @@ WINBASEAPI BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED #define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle)) WINBASEAPI BOOL WINAPI UnmapViewOfFile(LPCVOID); WINBASEAPI BOOL WINAPI UnmapViewOfFile2(HANDLE,PVOID,ULONG); +WINBASEAPI BOOL WINAPI UnmapViewOfFileEx(PVOID,ULONG); WINBASEAPI BOOL WINAPI UmsThreadYield(void *); WINBASEAPI HRESULT WINAPI UnregisterApplicationRestart(void); WINBASEAPI BOOL WINAPI UnregisterWait(HANDLE);