-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
IShellFolder support #524
IShellFolder support #524
Conversation
…nterface et al don't crash the whole JVM
d611eb6
to
931cf53
Compare
@@ -12,6 +12,7 @@ Features | |||
* [#512](https://github.com/java-native-access/jna/pull/512): Make loading debug flags mutable [@lwahonen](https://github.com/lwahonen). | |||
* [#514](https://github.com/java-native-access/jna/pull/514): Added `host_processor_info` to `com.sun.jna.platform.mac.SystemB` - [@dbwiddis](https://github.com/dbwiddis). | |||
* [#519](https://github.com/java-native-access/jna/pull/519): Added JNA functional overview - [@twall](https://github.com/twall). | |||
* [#524](https://github.com/java-native-access/jna/pull/524): IShellFolder interface plus necessary interfaces, and a sample for enumerating objects in My Computer - [@lwahonen](https://github.com/lwahonen). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be a pest, can you please make this look like the other lines "Added com.sun....", this is otherwise particularly confusing to non Windows people.
This is close. It needs some more test work, particularly for the big you fixed with REFIID. Thanks! Also port the documentation to the interfaces into JavaDoc please. |
Finally had time to look at this project again. Documentation added as requested, and the test now throws asserts on failure. Not sure how to test the REFIID thing. Structure has non-empty constructors, so calling those when subclassing seems like the right thing to do. Especially in cases like below, where the constructor parameter was just flat out ignored.
|
@@ -411,7 +417,7 @@ public ByReference(GUID guid) { | |||
* the memory | |||
*/ | |||
public ByReference(Pointer memory) { | |||
|
|||
super(memory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. The the Pointer
-based constructor is omitted, JNA still does the right thing (albeit less efficiently), but if the constructor is there, it better be correct. Depending on how this is used, you may want to call .read()
after the super()
call.
Motivation: How early data support was implemented was incorrect. We should only indicate early data is ready when it really is. Modifications: - Fix implementation to only notify about early data readiness when it is actually the case - Fix unit test Result: Correctly handle and support early data
I needed to wrap IShellFolder so I can enumerate objects in My Computer. Along the way I fixed Guid.REFIID and added a few definitions into other libraries too. The IShellFolder test uses all the added library functions, so they get tested via that.