PyHANDLE = DuplicateTokenEx(ExistingToken, ImpersonationLevel , DesiredAccess , TokenType , TokenAttributes )

Extended version of DuplicateToken.


ExistingToken : PyHANDLE

Logon token opened with TOKEN_DUPLICATE access

ImpersonationLevel : int

One of win32security.Security* values

DesiredAccess : int

Type of access required for the handle, combination of win32security.TOKEN_* flags

TokenType : int

Type of token to be created, TokenPrimary or TokenImpersonation

TokenAttributes=None : PySECURITY_ATTRIBUTES

Specifies security and inheritance for the new handle. None results in default DACL and no inheritance,


Accepts keyword arguments