Skip to content

Commit df1b824

Browse files
committed
OpenFileMapping method added to Kernel32 (issue #1093)
1 parent 030411b commit df1b824

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Next Release (5.10.0)
88
Features
99
--------
1010
* [#1377](https://github.com/java-native-access/jna/pull/1377): Add `RegLoadAppKey` to `c.s.j.p.win32.Advapi32` and `registryLoadAppKey` to `c.s.j.p.win32.Advapi32Util` - [@mfilippov](https://github.com/mfilippov).
11+
* [#1093](https://github.com/java-native-access/jna/issues/1093): Add `OpenFileMapping` to `c.s.j.p.win32.Kernel32` - [@lmitusinski](https://github.com/lmitusinski).
1112

1213
Bug Fixes
1314
---------

contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java

+19
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,25 @@ HANDLE CreateFileMapping(HANDLE hFile,
11071107
WinBase.SECURITY_ATTRIBUTES lpAttributes, int flProtect,
11081108
int dwMaximumSizeHigh, int dwMaximumSizeLow, String lpName);
11091109

1110+
/**
1111+
* Opens a named file mapping object.
1112+
*
1113+
* @param dwDesiredAccess
1114+
* The access to the file mapping object. This access is checked
1115+
* against any security descriptor on the target file mapping object.
1116+
* For a list of values, see File Mapping Security and Access Rights.
1117+
* @param bInheritHandle
1118+
* If this parameter is true, a process created by the CreateProcess
1119+
* function can inherit the handle; otherwise,
1120+
* the handle cannot be inherited.
1121+
* @param lpName
1122+
* The name of the file mapping object to be opened.
1123+
* @return If the function succeeds, the return value is an open handle to
1124+
* the specified file mapping object. If the function fails, the
1125+
* return value is NULL. To get extended error information, call GetLastError.
1126+
*/
1127+
HANDLE OpenFileMapping(int dwDesiredAccess, boolean bInheritHandle, String lpName);
1128+
11101129
/**
11111130
* Maps a view of a file mapping into the address space of a calling
11121131
* process.

0 commit comments

Comments
 (0)