AdjustTokenPrivileges(3w)

AdjustTokenPrivileges3w

Usage

BOOL AdjustTokenPrivileges
(
HANDLE TokenHandle,
BOOL DisableAllPrivileges,
PTOKEN_PRIVILEGES NewState,
DWORD BufferLength,
PTOKEN_PRIVILEGES PreviousState,
PDWORD ReturnLength
)

Overview

Adjust the privileges of an open token handle.

Params

TokenHandle [In] Handle from OpenProcessToken(3w) or OpenThreadToken(3w).

DisableAllPrivileges [In] TRUE=Remove all privileges, FALSE=Use NewState.

NewState [In] Desired new privileges of the token.

BufferLength [In] Length of NewState.

PreviousState [Out] Destination for the previous state.

ReturnLength [In/Out] Size of PreviousState.

Returns

Success: TRUE. Privileges are set to NewState and PreviousState is updated.

Failure: FALSE.

Notes

See NtAdjustPrivilegesToken(3w).

Implementation

Declared in "winbase.h".

Implemented in "dlls/advapi32/security.c".

Debug channel "advapi".

Releases

5 releases since Debian 2.0 (Hamm); the text changed 4 times.

  1. 2.0
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.