Closed dbyoung720 closed 3 years ago
Hi. Thanks for the report.
I added a definition to the headers, but I don't think it's necessary to create a wrapper for it. When using the library, I suggest calling NtxAdjustPrivilege
or NtxAdjustPrivileges
because they provide more flexibility. Here are some tips on how to use them:
NtCurrentProcessToken
, NtCurrentThreadToken
, or NtCurrentEffectiveToken
. The first two options correspond to setting the Client
parameter of RtlAdjustPrivilege
to False and True, respectively.TSeWellKnownPrivilege
enumeration, so you don't need to lookup a privilege LUID from its name.SE_PRIVILEGE_DISABLED
, SE_PRIVILEGE_ENABLED
, or SE_PRIVILEGE_REMOVED
to indicate the desired state.IgnoreMissing
to True and then compare the result to STATUS_NOT_ALL_ASSIGNED
. That provides functionality similar to WasEnabled
of RtlAdjustPrivilege
.OK. Thank!
Missing definition RtlAdjustPrivilege hope to add