Skip to content
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

Merged
merged 12 commits into from
Dec 4, 2015
Merged

Conversation

lwahonen
Copy link

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.

@@ -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).
Copy link
Member

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.

@dblock
Copy link
Member

dblock commented Oct 24, 2015

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.

@lwahonen
Copy link
Author

lwahonen commented Dec 4, 2015

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.

         public ByReference(Pointer memory) {

  •            super(memory);
         }
    

@@ -411,7 +417,7 @@ public ByReference(GUID guid) {
* the memory
*/
public ByReference(Pointer memory) {

super(memory);
Copy link
Contributor

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.

twall added a commit that referenced this pull request Dec 4, 2015
@twall twall merged commit 0ab0660 into java-native-access:master Dec 4, 2015
@lwahonen lwahonen deleted the IShellFolder_support branch December 4, 2015 22:47
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants