Update dependency net.java.dev.jna:jna-platform to v5 #97
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.2.2
->5.0.0
By merging this PR, the issue #59 will be automatically resolved and closed:
Release Notes
java-native-access/jna (net.java.dev.jna:jna-platform)
v5.0.0
Compare Source
=============
Features
HRESULT
inc.s.j.p.win32.COM.COMException
, introducec.s.j.p.win32.COM.COMInvokeException
as subclass ofCOMException
for exception as the result of aIDispatch#Invoke
. TheEXECPINFO
is unwrapped into fields in theCOMInvokeException
and correctly freed. - @matthiasblaesing.Native#loadLibrary
requires that the interface class passed in is an instance of Library. The runtime check can be enhanced by using a constraint generic. This breaks binary compatibility (see notes below) - @d-noll.In a followup, the original
loadLibrary
methods were deprecated andNative#load
methods were introduced, that hold the new generic definitions. So this change is now binary compatible.Structure#newInstance
receive the target type as a parameter. This adds a limited generic type, so that the return type ist the target type and not a generic structure, removing the necessity to do an explizit cast - @matthiasblaesing.@ComInterface
annotation tocom.sun.jna.platform.win32.COM.util.IConnectionPoint
to make it possible to retrieve it viaIUnknown#queryInterface
- @matthiasblaesing.Advapi32#EnumDependendServices
,Advapi32#EnumServicesStatusEx
andAdvapi32#QueryServiceStatus
.W32Service#stopService
was modified to be more resilent when stopping service - @matthiasblaesing.com.sun.jna.platform.win32.Kernel32.ExpandEnvironmentStrings
and add helper method for it asKernel32Util#expandEnvironmentStrings
- @matthiasblaesing.ACEs
fromcom.sun.jna.platform.win32.WinNT.ACL
even if the containedACE
is not currently supported - @jrobhoward.c.s.j.Structure.FieldOrder
annotation to define the field order of a structures without implementingStructure#getFieldOrder()
- @idosu.GetProcessTimes
andGetProcessIoCounters
tocom.sun.jna.platform.win32.Kernel32
- @dbwiddis.CreateMutex
,OpenMutex
andReleaseMutex
tocom.sun.jna.platform.win32.Kernel32
- @matthiasblaesing.PdhLookupPerfNameByIndex
,PdhLookupPerfIndexByName
, andPdhEnumObjectItems
toc.s.j.platform.win32.Pdh
and ac.s.j.platform.win32.PdhUtil
class to access them - @dbwiddis.PERF_OBJECT_TYPE
,PERF_COUNTER_BLOCK
, andPERF_COUNTER_DEFINITION
toc.s.j.platform.win32.WinPerf
and addedPointer
constructors to ``PERF_INSTANCE_DEFINITIONand
PERF_DATA_BLOCK` - @dbwiddis.WTS_PROCESS_INFO_EX
,WTSEnumerateProcessesEx
, andWTSFreeMemoryEx
toc.s.j.platform.win32.Wtsapi32
- @dbwiddis.GetIfEntry
,GetIfEntry2
, andGetNetworkParams
and supporting structuresMIB_IFROW
,MIB_IF_ROW2
, andFIXED_INFO
toc.s.j.platform.win32.IPHlpAPI.java
- @dbwiddis.CM_Locate_DevNode
,CM_Get_Parent
,CM_Get_Child
,CM_Get_Sibling
,CM_Get_Device_ID
, andCM_Get_Device_ID_Size
toc.s.j.platform.win32.Cfgmgr32.java
and ac.s.j.platform.win32.Cfgmgr32Util
class forCM_Get_Device_ID
- @dbwiddis.PdhLookupPerfIndexByEnglishName
toc.s.j.platform.win32.PdhUtil
- @dbwiddis.c.s.j.platform.mac.SystemB
for Process, Network interface, Swapfile, Time, and Filesystem info - @dbwiddis.Sysinfo
structure and function toc.s.j.platform.linux.LibC
- @dbwiddis.c.s.j.platform.win32.Advapi32Util
methods which allow the caller to specifysamDesiredExtra
to request additional registry key security and access rights - @camw.NativeMapped
to be used with enums - @koraktor.CoInitializeSecurity
andCoSetProxyBlanket
toc.s.j.platform.win32.Ole32
, added newc.s.j.platform.win32.Wbemcli
classes needed to query WMI, and added aWbemcliUtil
class implementing WMI queries. - @dbwiddis.~/Library/Application Support/JNA/temp
and on other Unix like systems$XDG_CACHE_DIR/JNA/temp
(Default value is:~/.cache/JNA/temp
) is used - @matthiasblaesing.com.sun.jna.platform.win32.Kernel32#ExitProcess
- @Groostav.Bug Fixes
com.sun.jna.platform.win32.SecBufferDesc
and add convenience binding ascom.sun.jna.platform.win32.SspiUtil.ManagedSecBufferDesc
. Bind SSPI functionsInitializeSecurityContext
,AcceptSecurityContext
,QueryCredentialsAttributes
,QuerySecurityPackageInfo
,EncryptMessage
,DecryptMessage
,MakeSignature
,VerifySignature
incom.sun.jna.platform.win32.Secur32
- @matthiasblaesing.COMLateBindingObject#getStringProperty
- @matthiasblaesing.gethostname
,sethostname
,getdomainname
andsetdomainname
and bindcom.sun.jna.platform.win32.Winsock2.gethostname(byte[], int)
- @matthiasblaesing.ELFAnalyser#runDetection
, fix suggested by @Sylvyrfysh in #880 - @matthiasblaesing.com.sun.jna.platform.win32.COM.util.ProxyObject#dispose
multiple times - @matthiasblaesing.Structure#validate
and preventArrayIndexOutOfBoundsException
inSAFEARRAY#read
for zero dimensions - @matthiasblaesing.javah
was removed from the JDK and
javac
is now used to create the necessary headers.JNA now has JDK 8 as the minimum build version, at runtime Java 6 is the minimum version.
Native code for platforms with a JDK version lower than 8 can still be build by (demonstrated for Solaris x86):
JNIEnv
pointer was used to access the JVM - @matthiasblaesing.lpAccessName
parameter ofcom.sun.jna.platform.win32.Mpr#WNetUseConnection
- @matthiasblaesing.jna.nosys
totrue
. By default then the embedded native library is used - @matthiasblaesing.Breaking Changes
com.sun.jna.Pointer#SIZE
is removed. Its use is replaced bycom.sun.jna.Native#POINTER_SIZE
to prevent a class loading deadlock, when JNA is initialized from multiple threads
com.sun.jna.Pointer#getString(long offset, boolean wide)
is removed. It was replaced bycom.sun.jna.Pointer#getString(long offset)
orcom.sun.jna.Pointer#getWideString(long offset)
com.sun.jna.Pointer#getStringArray(long offset, boolean wide)
is removed. It was replaced bycom.sun.jna.Pointer#getStringArray(long offset)
orcom.sun.jna.Pointer#getWideStringArray(long offset)
com.sun.jna.Pointer#setString(long offset, String value, boolean wide)
is removed. It was replaced bycom.sun.jna.Pointer#setString(long offset, String value)
orcom.sun.jna.Pointer#setWideString(long offset, String value)
com.sun.jna.Structure#setFieldOrder
is removed. It was replaced bycom.sun.jna.Structure#getFieldOrder
and threw anjava.lang.Error
on call.com.sun.jna.Native#parseVersion
was removed without replacementcom.sun.jna.Native#setPreserveLastError
andcom.sun.jna.Native#getPreserveLastError
were removed without replacement. They were turned into NOOPs in the past.
com.sun.jna.Native#getDirectByteBuffer
was replaced bycom.sun.jna.Pointer#getByteBuffer
gethostname
,sethostname
,getdomainname
and
setdomainname
in the interfacecom.sun.jna.platform.unix.LibCAPI
were changed from
(char[] name, int len)
to(byte[] name, int len)
com.sun.jna.Platform#isAix
was replaced bycom.sun.jna.Platform#isAIX
com.sun.jna.platform.win32.Sspi.SecBufferDesc
was incompatibly changed tomatch the correct native semantics. SecBufferDesc describing more than one
buffer were broken. For most usecases
com.sun.jna.platform.win32.SspiUtil.ManagedSecBufferDesc
is the bestalternative.
com.sun.jna.platform.win32.WinBase.FILETIME#toLong()
was replaced bycom.sun.jna.platform.win32.WinBase.FILETIME#toTime()
com.sun.jna.platform.win32.Variant#COM_DAYS_ADJUSTMENT
was removedcom.sun.jna.platform.win32.Variant#MICRO_SECONDS_PER_DAY
was removedcom.sun.jna.platform.win32.Variant.VARIANT#toJavaDate
was removedcom.sun.jna.platform.win32.Variant.VARIANT#fromJavaDate
was removedcom.sun.jna.platform.win32.User32#MonitorFromPoint(Point pt, int dwFlags)
was replaced by
com.sun.jna.platform.win32.User32#MonitorFromPoint(Point.ByValue pt, int dwFlags)
com.sun.jna.platform.win32.OleAuto.LoadTypeLib(WString, PointerByReference)
was replaced by
com.sun.jna.platform.win32.OleAuto.LoadTypeLib(String, PointerByReference)
com.sun.jna.platform.win32.Kernel32Util.formatMessageFromHR(HRESULT)
was replaced by
com.sun.jna.platform.win32.Kernel32Util.formatMessage(HRESULT)
com.sun.jna.platform.win32.COM.COMException
was structurally modified. ThepExcepInfo
andpuArgErr
members were removed andhresult
member was added.The now missing information in
COMException
was moved toCOMInvokeException
.com.sun.jna.platform.win32.COM.IShellFolder#GetDisplayNameOf
was changed from
PointerByReference
toSTRRET
and matching this,the first parameter of
com.sun.jna.platform.win32.Shlwapi.StrRetToStr
waschanged identically.
ACE_HEADER
replacesACEStructure
as the base class forACEs
.com.sun.jna.platform.win32.WinNT.ACL
was modified to support ACLS, that containACEs
other thanACCESS_ALLOWED_ACE_TYPE
andACCESS_DENIED_ACE_TYPE
bywidening the return type of
getACEStructures
toACE_HEADER[]
and renamingthe method to
getACEs
. Inconsequence
com.sun.jna.platform.win32.Advapi32Util#getFileSecurity
waschanged similarly. The SID accessors
getSidString
andgetSID
were movedfrom
ACEStructure
toACCESS_ACEStructure
.com.sun.jna.platform.win32.Ole32#CoCreateGuid(GUID.ByReference pguid)
was replaced bycom.sun.jna.platform.win32.Ole32#CoCreateGuid(GUID pguid)
andcom.sun.jna.platform.win32.Ole32#CLSIDFromString(WString lpsz, CLSID.ByReference pclsid)
was replaced bycom.sun.jna.platform.win32.Ole32#CLSIDFromString(String lpsz, CLSID.ByReference pclsid)
v4.5.2
Compare Source
v4.5.1
Compare Source
v4.5.0
Compare Source
=============
Features
OleBuildVersion
,OleInitialize
,OleUninitialize
,OleFlushClipboard
,OleRun
, add VARIANT conversion functions to OleAuto, add default locale, LCID and LANG to WinNT - @matthiasblaesing.boolean[]
in direct mapping - @ncruces.com.sun.jna.platform.win32.Advapi32
:StartServiceCtrlDispatcher
,RegisterServiceCtrlHandler
,RegisterServiceCtrlHandlerEx
,SetServiceStatus
,CreateService
,DeleteService
andcom.sun.jna.platform.win32.Winsvc
:Handler
,HandlerEx
,SERVICE_MAIN_FUNCTION
,SERVICE_TABLE_ENTRY
,SERVICE_DESCRIPTION
,SERVICE_STATUS_HANDLE
- @matthiasblaesing.Bug Fixes
com.sun.jna.platform.win32.User32#MonitorFromPoint
- @matthiasblaesing.v4.4.0
Compare Source
=============
Features
Bug Fixes