NtDllRtlAdjustPrivilege Method
Enables or disables a privilege from the calling thread or process.
Enabling or disabling privileges requires
AdjustPrivileges access.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("NtDll.dll", SetLastError = true)]
public static uint RtlAdjustPrivilege(
int privileges,
bool enablePrivilege,
bool isThreadPrivilege,
ref bool refPreviousValue
)
<DllImportAttribute("NtDll.dll", SetLastError := true>]
Public Shared Function RtlAdjustPrivilege (
privileges As Integer,
enablePrivilege As Boolean,
isThreadPrivilege As Boolean,
ByRef refPreviousValue As Boolean
) As UInteger
Dim privileges As Integer
Dim enablePrivilege As Boolean
Dim isThreadPrivilege As Boolean
Dim refPreviousValue As Boolean
Dim returnValue As UInteger
returnValue = NtDll.RtlAdjustPrivilege(privileges,
enablePrivilege, isThreadPrivilege,
refPreviousValue)
public:
[DllImportAttribute(L"NtDll.dll", SetLastError = true)]
static unsigned int RtlAdjustPrivilege(
int privileges,
bool enablePrivilege,
bool isThreadPrivilege,
bool% refPreviousValue
)
[<DllImportAttribute("NtDll.dll", SetLastError = true)>]
static member RtlAdjustPrivilege :
privileges : int *
enablePrivilege : bool *
isThreadPrivilege : bool *
refPreviousValue : bool byref -> uint32
No code example is currently available or this language may not be supported.
- privileges Int32
-
One or more privileges to set.
See: ProcessPrivileges
- enablePrivilege Boolean
-
If , enable the privilege, otherwise, in the calling process.
- isThreadPrivilege Boolean
-
If , the privilege is set for the calling thread, otherwise, for the calling process.
- refPreviousValue Boolean
-
A value that indicates whether the privilege was previously enabled or disabled.
UInt32
(Not documented)