Пример #1
0
 public static extern bool DuplicateTokenEx(
     IntPtr hExistingToken,
     Windows_h.TokenAccessFlags dwDesiredAccess,
     IntPtr lpThreadAttributes,
     Windows_h.SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
     Windows_h.TOKEN_TYPE TokenType,
     out IntPtr phNewToken);
Пример #2
0
 public static extern bool CreateProcessAsUserW(
     IntPtr hToken,
     string lpApplicationName,
     string lpCommandLine,
     IntPtr lpProcessAttributes,
     IntPtr lpThreadAttributes,
     bool bInheritHandles,
     Windows_h.CreationFlags dwCreationFlags,
     IntPtr lpEnvironment,
     string lpCurrentDirectory,
     ref Windows_h.STARTUPINFO lpStartupInfo,
     out Windows_h.PROCESS_INFORMATION lpProcessInformation);
Пример #3
0
 public static extern bool OpenProcessToken(IntPtr ProcessHandle,
     Windows_h.TokenAccessFlags DesiredAccess, out IntPtr TokenHandle);
Пример #4
0
 public static extern IntPtr OpenProcess(Windows_h.ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] 
     bool bInheritHandle, uint dwProcessId);