Skip to content

Commit

Permalink
OpenFileMapping method added to Kernel32 (issue java-native-access#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmitusinski committed Oct 12, 2021
1 parent 030411b commit df1b824
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -8,6 +8,7 @@ Next Release (5.10.0)
Features
--------
* [#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).
* [#1093](https://github.com/java-native-access/jna/issues/1093): Add `OpenFileMapping` to `c.s.j.p.win32.Kernel32` - [@lmitusinski](https://github.com/lmitusinski).

Bug Fixes
---------
Expand Down
19 changes: 19 additions & 0 deletions contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
Expand Up @@ -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.
Expand Down

0 comments on commit df1b824

Please sign in to comment.