[DllImport("advapi32.dll", SetLastError=true)]
static extern bool DuplicateToken(IntPtr ExistingTokenHandle, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, out IntPtr DuplicateTokenHandle);
Declare Function DuplicateToken Lib "advapi32.dll" (ExistingTokenHandle As IntPtr, _
ImpersonationLevel As SECURITY_IMPERSONATION_LEVEL, ByRef DuplicateTokenHandle As IntPtr) _
As Boolean
None.
As always, only do SetLastError=true if you actually intend to call GetLastError.
Please add some!
Please add some!
TODO