public static extern Boolean DuplicateTokenEx( IntPtr hExistingToken, UInt32 dwDesiredAccess, ref WinBase._SECURITY_ATTRIBUTES lpTokenAttributes, WinNT._SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, WinNT.TOKEN_TYPE TokenType, out IntPtr phNewToken );
public static extern Boolean ImpersonateSelf( WinNT._SECURITY_IMPERSONATION_LEVEL ImpersonationLevel );