-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update misleading informations in NtNotifyChangeMultipleKeys #2008
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ helpviewer_keywords: ["NtNotifyChangeMultipleKeys","NtNotifyChangeMultipleKeys f | |
| old-location: winprog\ntnotifychangemultiplekeys.htm | ||
| tech.root: winprog | ||
| ms.assetid: c1ee9793-490c-45de-a2a5-deab630917f6 | ||
| ms.date: 12/05/2018 | ||
| ms.date: 04/30/2025 | ||
| ms.keywords: NtNotifyChangeMultipleKeys, NtNotifyChangeMultipleKeys function [Windows API], REG_NOTIFY_CHANGE_ATTRIBUTES, REG_NOTIFY_CHANGE_LAST_SET, REG_NOTIFY_CHANGE_NAME, REG_NOTIFY_CHANGE_SECURITY, base.ntnotifychangemultiplekeys, winprog.ntnotifychangemultiplekeys, winternl/NtNotifyChangeMultipleKeys | ||
| req.header: winternl.h | ||
| req.include-header: | ||
|
|
@@ -62,23 +62,23 @@ A handle to an open key. The handle must be opened with the <b>KEY_NOTIFY</b> ac | |
|
|
||
| ### -param Count [in, optional] | ||
|
|
||
| The number of subkeys under the key specified by the <i>MasterKeyHandle</i> parameter. This parameter must be 1. | ||
| The number of keys objects provided in the <i>SubordinateObjects</i> parameter. This parameter must be 1. | ||
|
|
||
| ### -param SubordinateObjects [in, optional] | ||
|
|
||
| Pointer to an array of <a href="/windows-hardware/drivers/ddi/content/wudfwdm/ns-wudfwdm-_object_attributes">OBJECT_ATTRIBUTES</a> structures, one for each subkey. This array can contain one <b>OBJECT_ATTRIBUTES</b> structure. | ||
| Pointer to an array of <a href="/windows-hardware/drivers/ddi/content/wudfwdm/ns-wudfwdm-_object_attributes">OBJECT_ATTRIBUTES</a> structures, one for each key. This array can contain one <b>OBJECT_ATTRIBUTES</b> structure and must not be a key in the same hive as the <i>MasterKeyHandle</i> key. | ||
|
|
||
| ### -param Event [in, optional] | ||
|
|
||
| A handle to an event created by the caller. If <i>Event</i> is not <b>NULL</b>, the caller waits until the operation succeeds, at which time the event is signaled. | ||
|
|
||
| ### -param ApcRoutine [in, optional] | ||
|
|
||
| A pointer to an asynchronous procedure call (APC) function supplied by the caller. If <i>ApcRoutine</i> is not <b>NULL</b>, the specified APC function executes after the operation completes. | ||
| A pointer to an asynchronous procedure call (APC) function supplied by the caller. If <i>ApcRoutine</i> is not <b>NULL</b>, the specified APC function executes after the operation completes. A <a href="/windows-hardware/drivers/ddi/wdm/ns-wdm-_work_queue_item">WORK_QUEUE_ITEM</a> must be provided instead of ApcRoutine in the <i>ZwNotifyChangeMultipleKeys</i> variant. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The proposed change is strange. Normally zw routines are == NT ones except for the detour back into the syscall table that changes the PreviousMode to KerneMode.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The said parameters are just pointers, and they can be treated differently. This behavior was documented in ZwNotifyChangeKey but not here. |
||
|
|
||
| ### -param ApcContext [in, optional] | ||
|
|
||
| A pointer to a context supplied by the caller for its APC function. This value is passed to the APC function when it is executed. The <i>Asynchronous</i> parameter must be <b>TRUE</b>. If <i>ApcContext</i> is specified, the <i>Event</i> parameter must be <b>NULL</b>. | ||
| A pointer to a context supplied by the caller for its APC function. This value is passed to the APC function when it is executed. The <i>Asynchronous</i> parameter must be <b>TRUE</b>. If <i>ApcContext</i> is specified, the <i>Event</i> parameter must be <b>NULL</b>. A <a href="/windows-hardware/drivers/ddi/wdm/ne-wdm-_work_queue_type">WORK_QUEUE_TYPE</a> must be provided instead of ApcContext in the <i>ZwNotifyChangeMultipleKeys</i> variant. | ||
|
|
||
| ### -param IoStatusBlock [out] | ||
|
|
||
|
|
@@ -165,4 +165,4 @@ This function has no associated header file. You can also use the <a href="/wind | |
|
|
||
| ## -see-also | ||
|
|
||
| <a href="/windows/desktop/SysInfo/registry-key-security-and-access-rights">Registry Key Security and Access Rights</a> | ||
| <a href="/windows/desktop/SysInfo/registry-key-security-and-access-rights">Registry Key Security and Access Rights</a> | ||
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.
If these aren't in the same hive as the master root key, how then could they be "subkeys" of a given registry key, as the summary description of this function claims they are?
What then would be the usefulness of the function altogether if this weren't the case?
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.
Being a subkey isn't a requirement, I tested the API on \Registry\User.Default\TestKey while the master key was \Registry\Machine\Software\TestKey and it worked. While being a subkey is not a requirement, it's possible to load a hive in a non-root key so that way a key would have a subkey from another hive. As far as I know that's how BCD and SAM database are loaded in to the registry, they're not a root key like HKLM but a subkey of a parent key, but they're from a separate hive compared to their parent.