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.218-beta+101eee949414e414795e55a6e73d88938f0177b8
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