NtPrivilegeCheck - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTSEAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtPrivilegeCheck(
    _In_ HANDLE ClientToken,
    _Inout_ PPRIVILEGE_SET RequiredPrivileges,
    _Out_ PBOOLEAN Result
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwPrivilegeCheck(
    _In_ HANDLE ClientToken,
    _Inout_ PPRIVILEGE_SET RequiredPrivileges,
    _Out_ PBOOLEAN Result
    );

#endif

View code on GitHub

This function is documented in Windows Driver Kit.


Function NtPrivilegeCheck is used to check state of any privileges in Token Object. It's also described in Microsoft SDK as PrivilegeCheck.

TokenHandle

HANDLE to Token Object opened with TOKEN_QUERY access.

RequiredPrivileges

Pointer to PRIVILEGE_SET structure contains definitions of privileges to check.

Result

Result of call - pointer to BOOLEAN value containing TRUE is all asked privileges are enabled.

Documented by

See also