| 
            
              WindowsApiDuplicateTokenEx(IntPtr, UInt32, IntPtr, WindowsApiSECURITY_IMPERSONATION_LEVEL, WindowsApiTOKEN_TYPE, IntPtr) Method
             | 
          
        
        
            Win32 DuplicateTokenEx function.
            
        
        Namespace: GSF.InteropAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.257-beta+00aa2366fbb9ec75f636ebc7cfa610e3826a727c
Syntax[DllImportAttribute("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static bool DuplicateTokenEx(
	IntPtr hExistingToken,
	uint dwDesiredAccess,
	IntPtr lpTokenAttributes,
	WindowsApiSECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
	WindowsApiTOKEN_TYPE TokenType,
	out IntPtr phNewToken
)<DllImportAttribute("advapi32.dll", CharSet := CharSet.Auto, SetLastError := true>]
Public Shared Function DuplicateTokenEx ( 
	hExistingToken As IntPtr,
	dwDesiredAccess As UInteger,
	lpTokenAttributes As IntPtr,
	ImpersonationLevel As WindowsApiSECURITY_IMPERSONATION_LEVEL,
	TokenType As WindowsApiTOKEN_TYPE,
	<OutAttribute> ByRef phNewToken As IntPtr
) As Booleanpublic:
[DllImportAttribute(L"advapi32.dll", CharSet = CharSet::Auto, SetLastError = true)]
static bool DuplicateTokenEx(
	IntPtr hExistingToken, 
	unsigned int dwDesiredAccess, 
	IntPtr lpTokenAttributes, 
	WindowsApiSECURITY_IMPERSONATION_LEVEL ImpersonationLevel, 
	WindowsApiTOKEN_TYPE TokenType, 
	[OutAttribute] IntPtr% phNewToken
)
[<DllImportAttribute("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
static member DuplicateTokenEx : 
        hExistingToken : IntPtr * 
        dwDesiredAccess : uint32 * 
        lpTokenAttributes : IntPtr * 
        ImpersonationLevel : WindowsApiSECURITY_IMPERSONATION_LEVEL * 
        TokenType : WindowsApiTOKEN_TYPE * 
        phNewToken : IntPtr byref -> bool GSF.Interop.WindowsApi.DuplicateTokenEx = function(hExistingToken, dwDesiredAccess, lpTokenAttributes, ImpersonationLevel, TokenType, phNewToken);
 View SourceParameters
- hExistingToken  IntPtr
 -  
 - dwDesiredAccess  UInt32
 -  
 - lpTokenAttributes  IntPtr
 -  
 - ImpersonationLevel  WindowsApiSECURITY_IMPERSONATION_LEVEL
 -  
 - TokenType  WindowsApiTOKEN_TYPE
 -  
 - phNewToken  IntPtr
 -  
 
Return Value
Boolean
See Also