Click or drag to resize

WindowsApiDuplicateTokenEx(IntPtr, UInt32, WindowsApiSECURITY_ATTRIBUTES, WindowsApiSECURITY_IMPERSONATION_LEVEL, WindowsApiTOKEN_TYPE, IntPtr) Method

Win32 DuplicateTokenEx function.

Namespace: GSF.Interop
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
[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
)
View Source

Parameters

hExistingToken  IntPtr
 
dwDesiredAccess  UInt32
 
lpTokenAttributes  WindowsApiSECURITY_ATTRIBUTES
 
ImpersonationLevel  WindowsApiSECURITY_IMPERSONATION_LEVEL
 
TokenType  WindowsApiTOKEN_TYPE
 
phNewToken  IntPtr
 

Return Value

Boolean
See Also