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

Use correct bit masks when extracting low/high word from DWORD #683

Conversation

matthiasblaesing
Copy link
Member

No description provided.

This is a regression introduced by commit 

4218a07

The applied bit masks a 8 bit value, while word is 16 bit sized.

Closes: java-native-access#624
The desiredAccess value for OpenProcess was 0, this resulted in a
access denied error. While OpenProcess does not document this, it
mentions correct values, which do not include 0.

As QueryFullProcessImageName is documented to require 
PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION.

As PROCESS_QUERY_LIMITED_INFORMATION is documented to be wider supported
this is choosen.

https://msdn.microsoft.com/de-de/library/windows/desktop/ms684880(v=vs.85).aspx
@twall
Copy link
Contributor

twall commented Jul 24, 2016

@matthiasblaesing matthiasblaesing merged commit c3cb85a into java-native-access:master Jul 26, 2016
@matthiasblaesing matthiasblaesing deleted the dword_extract_high_low_word branch August 5, 2016 22:45
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
java-native-access#683)

…s received

Motivation:

If STREAM_STOPPED is received we should fail all writes with
ChannelOutputShutdownException before tearing down the channel

Modifications:

Explicit handle STREAM_STOPPED

Result:

Better signaling of received STREAM_STOPPED
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.

2 participants