|
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.248-beta+a497a19de709fd99e2448886199a2c8824265ddf
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 Boolean
public:
[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