-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Kernel32.ProcessIdToSessionId and resource extraction functions #543
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
Conversation
@@ -32,6 +31,32 @@ | |||
Kernel32.class, W32APIOptions.DEFAULT_OPTIONS); | |||
|
|||
/** | |||
* <strong>LOAD_LIBRARY_AS_DATAFILE</strong> <br> |
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.
What's up with all this HTML in the function descriptions. Looks like this was being cleaned up in other functions.
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.
Yeah, I forgot this one.
Cleaned up now though.
You should squash your commits please. I'll let this sit here for other people's comments for a bit. |
Ok, should be squashed now. |
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. |
Sure, I can definitely reformat things. Sent from my iPhone
|
@twall what's our tab/spaces story? |
Spaces only. Indent of 4. Look at the core JNA classes as an example, since the platform stuff is a bit less consistent.
|
…/Load/LockResource, etc) Updated changelog.
I'm merging this, thanks @mlfreeman2. |
Kernel32.ProcessIdToSessionId and resource extraction functions
Motivation: We dont need this extra dependency as we can just directly use what is provided by the JDK Modifications: Remove dependency and call directly what we have in the JDK Result: Fixes netty/netty-incubator-codec-quic#538
Kernel32.dll Functions
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.