Пример #1
0
 internal static extern bool DuplicateTokenEx(
     IntPtr hExistingToken,
     uint dwDesiredAccess,
     ref SecutiryAttributes lpTokenAttributes,
     SecurityImpersonationLevel ImpersonationLevel,
     TokenType TokenType,
     out IntPtr phNewToken);
Пример #2
0
 internal static extern bool CreateProcessAsUser(
     IntPtr hToken,
     string lpApplicationName,
     string lpCommandLine,
     ref SecutiryAttributes lpProcessAttributes,
     ref SecutiryAttributes lpThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     ref STARTUPINFO lpStartupInfo,
     out PROCESS_INFORMATION lpProcessInformation);