Skip to content

Fix for free data handle in DdemlUtil. #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
=============
Expand Down
1 change: 1 addition & 0 deletions contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down