public static extern bool DuplicateTokenEx(int ExistingToken, TOKEN_RIGHTS DesiredAccess, int TokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, TOKEN_TYPE TokenType, out int NewToken);
public static extern bool OpenThreadToken(int ThreadHandle, TOKEN_RIGHTS DesiredAccess, bool OpenAsSelf, out int TokenHandle);
public static extern bool OpenProcessToken(int ProcessHandle, TOKEN_RIGHTS DesiredAccess, out int TokenHandle);