NtQueryMultipleValueKey function (winternl.h)

[This function may be changed or removed from Windows without further notice.]

Retrieves values for the specified multiple-value key.

Syntax

__kernel_entry NTSTATUS NtQueryMultipleValueKey(
  [in]            HANDLE           KeyHandle,
  [in, out]       PKEY_VALUE_ENTRY ValueEntries,
  [in]            ULONG            EntryCount,
  [out]           PVOID            ValueBuffer,
  [in, out]       PULONG           BufferLength,
  [out, optional] PULONG           RequiredBufferLength
);

Parameters

[in] KeyHandle

A handle to the key for which to retrieve values. The handle must be opened with the KEY_QUERY_VALUE access right.

[in, out] ValueEntries

A pointer to an array of [KEY_VALUE_ENTRY] structures containing the names of values to retrieve.

[in] EntryCount

The number of elements in the ValueEntries array.

[out] ValueBuffer

A pointer to a buffer to receive the values.

[in, out] BufferLength

A pointer to a variable that contains the size of the buffer at ValueBuffer, in bytes. When the function returns, the BufferLength parameter contains the number of bytes written to the buffer at ValueBuffer.

[out, optional] RequiredBufferLength

A pointer to a variable to receive the number of bytes required for all of the values to be returned by the function. This parameter can be NULL.

Return value

Returns an NTSTATUS or error code.

If the buffer is too small to hold the information to be retrieved, the function returns STATUS_BUFFER_OVERFLOW and, if the RequiredBufferLength parameter is specified, sets it to the buffer size required.

The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the WDK, and are described in the WDK documentation.

Remarks

This function has no associated header file. You can also use the LoadLibrary and GetProcAddress functions to dynamically link to Ntdll.dll.

Requirements

Requirement Value
Target Platform Windows
Header winternl.h
Library ntdll.lib
DLL ntdll.dll

See also

Registry Key Security and Access Rights