SeSinglePrivilegeCheck function (ntddk.h)

The SeSinglePrivilegeCheck routine checks for the passed privilege value in the context of the current thread.

Syntax

BOOLEAN SeSinglePrivilegeCheck(
  [in] LUID            PrivilegeValue,
  [in] KPROCESSOR_MODE PreviousMode
);

Parameters

[in] PrivilegeValue

Specifies the LUID value of the privilege being checked.

[in] PreviousMode

Specifies the previous execution mode, one of UserMode or KernelMode.

Return value

SeSinglePrivilegeCheck returns TRUE if the current subject has the required privilege.

Remarks

If PreviousMode is KernelMode, the privilege check always succeeds. Otherwise, this routine uses the token of the user-mode thread to determine whether the current (user-mode) thread has been granted the given privilege.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of Windows.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)

See also

LUID

RtlConvertLongToLuid

RtlConvertUlongToLuid

RtlEqualLuid

SeValidSecurityDescriptor