SecurityWin32Util.DuplicateToken Method
The Win32 CloseHandleDllImport method. For more information, see StreamingContext Structure and Using the DllImport Attribute.
Namespace: Microsoft.Office.Excel.Server.Addins.ComputeCluster.Security
Assembly: Microsoft.Office.Excel.Server.Addins.ComputeCluster (in Microsoft.Office.Excel.Server.Addins.ComputeCluster.dll)
Syntax
'Declaration
Public Shared Function DuplicateToken ( _
ExistingTokenHandle As IntPtr, _
SECURITY_IMPERSONATION_LEVEL As Integer, _
ByRef DuplicateTokenHandle As IntPtr _
) As Boolean
'Usage
Dim ExistingTokenHandle As IntPtr
Dim SECURITY_IMPERSONATION_LEVEL As Integer
Dim DuplicateTokenHandle As IntPtr
Dim returnValue As Boolean
returnValue = SecurityWin32Util.DuplicateToken(ExistingTokenHandle, _
SECURITY_IMPERSONATION_LEVEL, DuplicateTokenHandle)
public static bool DuplicateToken(
IntPtr ExistingTokenHandle,
int SECURITY_IMPERSONATION_LEVEL,
ref IntPtr DuplicateTokenHandle
)
Parameters
- ExistingTokenHandle
Type: System.IntPtr
- SECURITY_IMPERSONATION_LEVEL
Type: System.Int32
- DuplicateTokenHandle
Type: System.IntPtr
Return Value
Type: System.Boolean
See Also
Reference
Microsoft.Office.Excel.Server.Addins.ComputeCluster.Security Namespace