Represents a wrapper class for a token handle.
Наследование: Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
Пример #1
0
 public static extern bool SetTokenInformation(
     SafeTokenHandle hToken,
     TOKEN_INFORMATION_CLASS tokenInfoClass,
     IntPtr pTokenInfo,
     Int32 tokenInfoLength);
Пример #2
0
 public static extern bool DuplicateTokenEx(
     SafeTokenHandle hExistingToken,
     UInt32 desiredAccess,
     IntPtr pTokenAttributes,
     SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
     TOKEN_TYPE TokenType,
     out SafeTokenHandle hNewToken);
Пример #3
0
 public static extern bool OpenProcessToken(
     IntPtr hProcess,
     UInt32 desiredAccess,
     out SafeTokenHandle hToken);
Пример #4
0
 public static extern bool CreateProcessAsUser(
     SafeTokenHandle hToken,
     string applicationName,
     string commandLine,
     IntPtr pProcessAttributes,
     IntPtr pThreadAttributes,
     bool bInheritHandles,
     uint dwCreationFlags,
     IntPtr pEnvironment,
     string currentDirectory,
     ref STARTUPINFO startupInfo,
     out PROCESS_INFORMATION processInformation);