From fc5585652d9b4b5062af9d64115d89e2b1ce0840 Mon Sep 17 00:00:00 2001 From: Tomasz Stolarczyk Date: Wed, 15 Feb 2017 13:23:06 +0100 Subject: [PATCH 1/2] Fix for free data handle in DdemlUtil. Adding additional comment for DdeAccessData binding. --- contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java | 1 + contrib/platform/src/com/sun/jna/platform/win32/DdemlUtil.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java b/contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java index 34d68f4d3a..bac53f250c 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java @@ -2561,6 +2561,7 @@ public HDDEDATA DdeCreateDataHandle( public int DdeGetData(HDDEDATA hData, Pointer pDst, int cbMax, int cbOff); /** + * Provides access to the data in the specified Dynamic Data Exchange (DDE) object. * An application must call the DdeUnaccessData function when it has * finished accessing the data in the object. * diff --git a/contrib/platform/src/com/sun/jna/platform/win32/DdemlUtil.java b/contrib/platform/src/com/sun/jna/platform/win32/DdemlUtil.java index c5f5cf6cec..21f5cd37b7 100644 --- a/contrib/platform/src/com/sun/jna/platform/win32/DdemlUtil.java +++ b/contrib/platform/src/com/sun/jna/platform/win32/DdemlUtil.java @@ -731,7 +731,7 @@ public Ddeml.HDDEDATA createDataHandle(Pointer pSrc, int cb, int cbOff, Ddeml.HS } public void freeDataHandle(Ddeml.HDDEDATA hData) { - boolean result = Ddeml.INSTANCE.DdeUnaccessData(hData); + boolean result = Ddeml.INSTANCE.DdeFreeDataHandle(hData); if(! result) { throw DdemlException.create(getLastError()); } From 85dc077a22edbe8499ff2bca111b29c8941b2515 Mon Sep 17 00:00:00 2001 From: Tomasz Stolarczyk Date: Thu, 16 Feb 2017 08:27:04 +0100 Subject: [PATCH 2/2] Update CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index a9cc43c16a..21273018f8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,7 @@ Bug Fixes * [#754](https://github.com/java-native-access/jna/issues/754): Move MSVC build to standard stdbool.h and require Visual C++ 2015 (sizeof(bool) = 1 is now also true on MSVC build) - [@matthiasblaesing](https://github.com/matthiasblaesing). * [#399](https://github.com/java-native-access/jna/issues/399): Check native version before attempting to call into native code - [@matthiasblaesing](https://github.com/matthiasblaesing). * [#763](https://github.com/java-native-access/jna/issues/763): Fix vararg calls without fixed parts - [@matthiasblaesing](https://github.com/matthiasblaesing). +* [#770](https://github.com/java-native-access/jna/pull/770): Fix for free data handle in DdemlUtil. - [@stolarczykt](https://github.com/stolarczykt). Release 4.3.0 =============