From 8206cd07f0ffe9d1e85877a1be5d58abbbe1e002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mitusi=C5=84ski?= Date: Tue, 12 Oct 2021 11:06:29 +0200 Subject: [PATCH] OpenFileMapping method added in Kernel32 (issue #1093) --- .../com/sun/jna/platform/win32/Kernel32.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java b/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java index 45a7c3a3d6..947beb396e 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java @@ -1107,6 +1107,25 @@ HANDLE CreateFileMapping(HANDLE hFile, WinBase.SECURITY_ATTRIBUTES lpAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, String lpName); + /** + * Opens a named file mapping object. + * + * @param dwDesiredAccess + * The access to the file mapping object. This access is checked + * against any security descriptor on the target file mapping object. + * For a list of values, see File Mapping Security and Access Rights. + * @param bInheritHandle + * If this parameter is true, a process created by the CreateProcess + * function can inherit the handle; otherwise, + * the handle cannot be inherited. + * @param lpName + * The name of the file mapping object to be opened. + * @return If the function succeeds, the return value is an open handle to + * the specified file mapping object. If the function fails, the + * return value is NULL. To get extended error information, call GetLastError. + */ + HANDLE OpenFileMapping(int dwDesiredAccess, boolean bInheritHandle, String lpName); + /** * Maps a view of a file mapping into the address space of a calling * process.