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 CreateProcessAsUser( IntPtr hToken, IntPtr lpApplicationName, IntPtr lpCommandLine, ref WinBase._SECURITY_ATTRIBUTES lpProcessAttributes, ref WinBase._SECURITY_ATTRIBUTES lpThreadAttributes, Boolean bInheritHandles, CREATION_FLAGS dwCreationFlags, IntPtr lpEnvironment, IntPtr lpCurrentDirectory, ref ProcessThreadsAPI._STARTUPINFO lpStartupInfo, out ProcessThreadsAPI._PROCESS_INFORMATION lpProcessInfo );