Windows
|
[DllImportAttribute("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static bool DuplicateTokenEx( IntPtr hExistingToken, uint dwDesiredAccess, ref WindowsApiSECURITY_ATTRIBUTES lpTokenAttributes, WindowsApiSECURITY_IMPERSONATION_LEVEL ImpersonationLevel, WindowsApiTOKEN_TYPE TokenType, out IntPtr phNewToken )