REG_NOTIFY_THREAD_AGNOSTIC should be supported #1333 #1337
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starting with Windows 8, the additional notification filter constant REG_NOTIFY_THREAD_AGNOSTIC has been added, which is used as possible control argument for RegNotifyChangeKeyValue's dwNotifyFilter function argument (see nf-winreg-regnotifychangekeyvalue) and whose underlying integral value has the value 0x10000000 (specified on the page linked above). This constant is currently missing in the existing set of REG_NOTIFY_CHANGE_* constants in com.sun.jna.platform.win32.WinNT. In addition to the lack of the constant, the second problem is, that for Windows systems of at least Windows 8, the existing combined constant, which is currently defined as
int REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME
| REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET
| REG_NOTIFY_CHANGE_SECURITY;
is incorrect, because it needs to take the additional value of REG_NOTIFY_THREAD_AGNOSTIC into account.
This change requests solves both problems by (a) providing the missing REG_NOTIFY_THREAD_AGNOSTIC constant in com.sun.jna.platform.win32.WinNT and (b) by updating the existing REG_LEGAL_CHANGE_FILTER constant in regard to the added REG_NOTIFY_THREAD_AGNOSTIC