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

Kernel32.ProcessIdToSessionId and resource extraction functions #543

Merged
merged 1 commit into from
Nov 28, 2015
Merged

Kernel32.ProcessIdToSessionId and resource extraction functions #543

merged 1 commit into from
Nov 28, 2015

Conversation

mlfreeman2
Copy link
Contributor

Kernel32.dll Functions

  • ProcessIdToSessionId
  • LoadLibraryEx
  • FindResource
  • LoadResource
  • LockResource
  • SizeofResource
  • FreeLibrary

The last 6 are implemented as a single workflow (utility function). It didn't make sense to submit them as individual PRs.
Given a file path, resource type, and resource name, the utility function in Kernel32Util should return a byte array of the resources's content.
ProcessIdToSessionId and LoadLibraryEx have their own tests, and the others are indirectly tested by testing the helper function.

@@ -32,6 +31,32 @@
Kernel32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* <strong>LOAD_LIBRARY_AS_DATAFILE</strong> <br>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with all this HTML in the function descriptions. Looks like this was being cleaned up in other functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I forgot this one.
Cleaned up now though.

@dblock
Copy link
Member

dblock commented Nov 26, 2015

You should squash your commits please. I'll let this sit here for other people's comments for a bit.

@mlfreeman2
Copy link
Contributor Author

Ok, should be squashed now.

@dblock
Copy link
Member

dblock commented Nov 27, 2015

There're a lot of tab/spaces changes here, I think you have different defaults than what this project uses, so there're a bunch of non-changes. Would you mind taking a look please? Thx.

@mlfreeman2
Copy link
Contributor Author

Sure, I can definitely reformat things.
Where are the official code format settings documented? Is there an Eclipse code formatter profile XML I can import?

Sent from my iPhone

On Nov 27, 2015, at 9:55 AM, Daniel Doubrovkine (dB.) @dblockdotorg notifications@github.com wrote:

There're a lot of tab/spaces changes here, I think you have different defaults than what this project uses, so there're a bunch of non-changes. Would you mind taking a look please? Thx.


Reply to this email directly or view it on GitHub.

@dblock
Copy link
Member

dblock commented Nov 27, 2015

@twall what's our tab/spaces story?

@twall
Copy link
Contributor

twall commented Nov 28, 2015

Spaces only. Indent of 4. Look at the core JNA classes as an example, since the platform stuff is a bit less consistent.

On Nov 27, 2015, at 2:20 PM, Daniel Doubrovkine (dB.) @dblockdotorg notifications@github.com wrote:

@twall what's our tab/spaces story?


Reply to this email directly or view it on GitHub.

@mlfreeman2
Copy link
Contributor Author

Ok, I've scrubbed the 5 Java files in this PR to match what @twall said.
Some of the whitespace changes that @dblock originally saw should stay - it appears that previous commits to these files were using tabs not spaces.

@dblock
Copy link
Member

dblock commented Nov 28, 2015

I'm merging this, thanks @mlfreeman2.

dblock added a commit that referenced this pull request Nov 28, 2015
Kernel32.ProcessIdToSessionId and resource extraction functions
@dblock dblock merged commit 7fe56b6 into java-native-access:master Nov 28, 2015
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.

None yet

3 participants