Undocumented functions of NTDLL

2OO1, 15 February


Gridstore - NonStop Storage

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:
  • 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