Nikolay Sivov : kernelbase: Implement UnmapViewOfFile2().

Alexandre Julliard julliard at winehq.org
Thu May 5 15:56:01 CDT 2022


Module: wine
Branch: master
Commit: 757f9e975119b733b0808e5f65d848667faaf925
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=757f9e975119b733b0808e5f65d848667faaf925

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu May  5 09:49:39 2022 +0300

kernelbase: Implement UnmapViewOfFile2().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/kernelbase.spec | 1 +
 dlls/kernelbase/memory.c        | 9 +++++++++
 include/winbase.h               | 1 +
 3 files changed, 11 insertions(+)

diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 7095927c61e..854797ddeb0 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1653,6 +1653,7 @@
 @ stdcall UnlockFile(long long long long long)
 @ stdcall UnlockFileEx(long long long long ptr)
 @ stdcall UnmapViewOfFile(ptr)
+@ stdcall UnmapViewOfFile2(long ptr long)
 # @ stub UnmapViewOfFileEx
 # @ stub UnregisterBadMemoryNotification
 # @ stub UnregisterGPNotificationInternal
diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c
index 49bf71e0aa2..87c07887482 100644
--- a/dlls/kernelbase/memory.c
+++ b/dlls/kernelbase/memory.c
@@ -303,6 +303,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH UnmapViewOfFile( const void *addr )
 }
 
 
+/***********************************************************************
+ *             UnmapViewOfFile2   (kernelbase.@)
+ */
+BOOL WINAPI DECLSPEC_HOTPATCH UnmapViewOfFile2( HANDLE process, void *addr, ULONG flags )
+{
+    return set_ntstatus( NtUnmapViewOfSectionEx( process, addr, flags ));
+}
+
+
 /***********************************************************************
  *             VirtualAlloc   (kernelbase.@)
  */
diff --git a/include/winbase.h b/include/winbase.h
index 55be6dbf62b..2b109af19df 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2741,6 +2741,7 @@ WINBASEAPI BOOL        WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED
 #define                       UnlockResource(handle) ((handle), 0)
 #define                       UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
 WINBASEAPI BOOL        WINAPI UnmapViewOfFile(LPCVOID);
+WINBASEAPI BOOL        WINAPI UnmapViewOfFile2(HANDLE,PVOID,ULONG);
 WINBASEAPI BOOL        WINAPI UmsThreadYield(void *);
 WINBASEAPI HRESULT     WINAPI UnregisterApplicationRestart(void);
 WINBASEAPI BOOL        WINAPI UnregisterWait(HANDLE);




More information about the wine-cvs mailing list