NtQueryLicenseValue - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

//
// Licensing
//

/**
 * The NtQueryLicenseValue routine retrieves a licensing-related value from the
 * system licensing database.
 *
 * \param ValueName A pointer to a UNICODE_STRING structure that contains the name of the license value to query.
 * \param Type An optional pointer that receives the type of the returned data.
 * \param Data An optional buffer that receives the value data.
 * \param DataSize The size, in bytes, of the buffer pointed to by Data.
 * \param ResultDataSize A pointer that receives the number of bytes required to store the complete value data.
 * \return NTSTATUS Successful or errant status.
 * \see https://learn.microsoft.com/en-us/windows/win32/api/slpublic/nf-slpublic-slquerylicensevaluefromapp
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryLicenseValue(
    _In_ PCUNICODE_STRING ValueName,
    _Out_opt_ PULONG Type,
    _Out_writes_bytes_to_opt_(DataSize, *ResultDataSize) PVOID Data,
    _In_ ULONG DataSize,
    _Out_ PULONG ResultDataSize
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwQueryLicenseValue(
    _In_ PCUNICODE_STRING ValueName,
    _Out_opt_ PULONG Type,
    _Out_writes_bytes_to_opt_(DataSize, *ResultDataSize) PVOID Data,
    _In_ ULONG DataSize,
    _Out_ PULONG ResultDataSize
    );

#endif

View code on GitHub

NtDoc

No description available.