Registry Watcher does not work for Windows 7 environment
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3k
- Forks
- 300
- Avg merge
- 19h 12m
- Merged PRs (30d)
- 1
Description
When trying to use Registry Watchers for Windows 7, the application crashes when initializing an registry watcher.
During the code analyzing it was noticed that the flag REG_NOTIFY_THREAD_AGNOSTIC is used during the initialization in the Registry.h with the Windows API RegNotifyChangeKeyValue.
However, according to Microsoft's MSDN, the flag is only available for Windows 8.
--> https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regnotifychangekeyvalue
REG_NOTIFY_THREAD_AGNOSTIC0x10000000L
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.
Lines of code in registry.h
RETURN_IF_WIN32_ERROR(RegNotifyChangeKeyValue(watcherState->m_keyToWatch.get(),
watcherState->m_isRecursive, REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_THREAD_AGNOSTIC,
watcherState->m_eventHandle.get(), TRUE));
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Registry.h at the RegNotifyChangeKeyValue call and compare the REG_NOTIFY_THREAD_AGNOSTIC usage with the linked Microsoft documentation. Check how registry watcher initialization behaves on Windows 7 and verify that a watcher no longer crashes there while preserving supported behavior on newer Windows versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100