2OO1, 15 February
NtDuplicateToken
NtDuplicateToken
NTSYSAPI
NTSTATUS
NTAPI
NtDuplicateToken(
IN HANDLE ExistingToken,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
IN TOKEN_TYPE TokenType,
OUT PHANDLE NewToken );
Function NtDuplicateToken creates new Token Object
basing on existing Token Object.
- ExistingToken HANDLE to Token
Object opened with TOKEN_DUPLICATE access.
- DesiredAccess Access mask for newly
created token. Can be combination of:
- TOKEN_ASSIGN_PRIMARY
- TOKEN_DUPLICATE
- TOKEN_IMPERSONATE
- TOKEN_QUERY
- TOKEN_QUERY_SOURCE
- TOKEN_ADJUST_PRIVILEGES
- TOKEN_ADJUST_GROUPS
- TOKEN_ADJUST_DEFAULT
- TOKEN_ADJUST_SESSIONID
- ObjectAttributes Optionally pointer to
OBJECT_ATTRIBUTES structure, containing token's name.
- ImpersonationLevel Level of
impersonation for new token.
- TokenType Type of new token.
- NewToken Result of call - pointer to
HANDLE to new Token Object.
- Documented by:
- Tomasz Nowak
- Reactos
Requirements:
- Library: ntdll.lib
See also:
- NtCreateToken
-
NtOpenProcessToken
-
NtOpenThreadToken
-
NtQueryInformationToken
-
NtSetInformationToken