From 1f0c578a6b29fe7726db1540f375fd47f55fc1e8 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Thu, 10 Dec 2020 16:09:41 -0800 Subject: [PATCH] windows: add RegNotifyChangeKeyValue notifyFilter flags Copied with permission (and CLA) from https://git.zx2c4.com/wireguard-go/tree/tun/wintun/registry/registry_windows.go?id=5ca1218a5c16fb9b5e99b61c0b5758f66087e2e4 Change-Id: I42c1657b603f8494dadedacc8f7d719d39df9dc0 Reviewed-on: https://go-review.googlesource.com/c/sys/+/277153 Trust: Josh Bleecher Snyder Trust: Jason A. Donenfeld Run-TryBot: Josh Bleecher Snyder TryBot-Result: Go Bot Reviewed-by: Jason A. Donenfeld --- windows/types_windows.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/windows/types_windows.go b/windows/types_windows.go index 265d797c..bbede404 100644 --- a/windows/types_windows.go +++ b/windows/types_windows.go @@ -1820,3 +1820,21 @@ const ( LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x00004000 LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY = 0x00008000 ) + +// RegNotifyChangeKeyValue notifyFilter flags. +const ( + // REG_NOTIFY_CHANGE_NAME notifies the caller if a subkey is added or deleted. + REG_NOTIFY_CHANGE_NAME = 0x00000001 + + // REG_NOTIFY_CHANGE_ATTRIBUTES notifies the caller of changes to the attributes of the key, such as the security descriptor information. + REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002 + + // REG_NOTIFY_CHANGE_LAST_SET notifies the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value. + REG_NOTIFY_CHANGE_LAST_SET = 0x00000004 + + // REG_NOTIFY_CHANGE_SECURITY notifies the caller of changes to the security descriptor of the key. + REG_NOTIFY_CHANGE_SECURITY = 0x00000008 + + // REG_NOTIFY_THREAD_AGNOSTIC indicates that the lifetime of the registration must not be tied to the lifetime of the thread issuing the RegNotifyChangeKeyValue call. Note: This flag value is only supported in Windows 8 and later. + REG_NOTIFY_THREAD_AGNOSTIC = 0x10000000 +)