NtDllRtlAdjustPrivilege Method

Enables or disables a privilege from the calling thread or process.

Enabling or disabling privileges requires AdjustPrivileges access.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

UInt32
(Not documented)

Remarks

See Also