#ifndef _NTSEAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
NtPrivilegeCheck(
_In_ HANDLE ClientToken,
_Inout_ PPRIVILEGE_SET RequiredPrivileges,
_Out_ PBOOLEAN Result
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwPrivilegeCheck(
_In_ HANDLE ClientToken,
_Inout_ PPRIVILEGE_SET RequiredPrivileges,
_Out_ PBOOLEAN Result
);
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.
HANDLE
to Token Object opened with TOKEN_QUERY
access.
Pointer to PRIVILEGE_SET
structure contains definitions of privileges to check.
Result of call - pointer to BOOLEAN
value containing TRUE is all asked privileges are enabled.