win32security.DuplicateToken

PyHANDLE = DuplicateToken(ExistingTokenHandle, ImpersonationLevel )

Creates a copy of an access token with specified impersonation level

Parameters

ExistingTokenHandle : PyHANDLE

Handle to an access token (see win32security::LogonUser,win32security::OpenProcessToken)

ImpersonationLevel : int

A value from SECURITY_IMPERSONATION_LEVEL enum