NTSTATUS
ZwEnumerateValueKey(
IN HANDLE KeyHandle,
IN ULONG Index,
IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
OUT PVOID KeyValueInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
ZwEnumerateValueKey returns information about the value entries of an open key.
KeyValueBasicInformation
KeyValueFullInformation
KeyValuePartialInformation
ZwEnumerateValueKey returns STATUS_SUCCESS, together with the name of the Index subkey to the given KeyValueInformation buffer. Otherwise, ZwEnumerateValueKey can return one of the following values:
STATUS_NO_MORE_VALUES
STATUS_BUFFER_OVERFLOW
STATUS_INVALID_PARAMETER
The KeyHandle passed to ZwEnumerateValueKey must have been opened with the KEY_QUERY_VALUE DesiredAccess flag set for this call to succeed. See ZwCreateKey for a description of possible values for DesiredAccess.
The Index is simply a way to select among subkeys with value entries. Two calls to ZwEnumerateValueKey with the same Index are not guaranteed to return the same results.
Callers of ZwEnumerateValueKey must be running at IRQL PASSIVE_LEVEL.