3 instantiations of SafeAccessTokenHandle
mscorlib (3)
system\security\accesscontrol\privilege.cs (2)
174
private SafeAccessTokenHandle threadHandle = new
SafeAccessTokenHandle
( IntPtr.Zero );
178
private static volatile SafeAccessTokenHandle processHandle = new
SafeAccessTokenHandle
( IntPtr.Zero );
system\security\safesecurityhandles.cs (1)
29
get { return new
SafeAccessTokenHandle
(IntPtr.Zero); }
57 references to SafeAccessTokenHandle
mscorlib (57)
microsoft\win32\win32native.cs (12)
2077
[In]
SafeAccessTokenHandle
TokenHandle,
2094
[In]
SafeAccessTokenHandle
TokenHandle,
2176
[In,Out] ref
SafeAccessTokenHandle
lpTargetHandle,
2187
[In]
SafeAccessTokenHandle
hSourceHandle,
2189
[In,Out] ref
SafeAccessTokenHandle
lpTargetHandle,
2200
[In]
SafeAccessTokenHandle
ExistingTokenHandle,
2205
[In,Out] ref
SafeAccessTokenHandle
DuplicateTokenHandle );
2211
[In]
SafeAccessTokenHandle
hExistingToken,
2216
[In,Out] ref
SafeAccessTokenHandle
phNewToken);
2300
[In]
SafeAccessTokenHandle
TokenHandle,
2600
[In,Out] ref
SafeAccessTokenHandle
Token,
2642
[Out] out
SafeAccessTokenHandle
TokenHandle);
system\security\accesscontrol\privilege.cs (5)
174
private
SafeAccessTokenHandle
threadHandle = new SafeAccessTokenHandle( IntPtr.Zero );
178
private static volatile
SafeAccessTokenHandle
processHandle = new SafeAccessTokenHandle( IntPtr.Zero );
204
SafeAccessTokenHandle
localProcessHandle;
232
SafeAccessTokenHandle
threadHandleBefore = this.threadHandle;
389
public
SafeAccessTokenHandle
ThreadHandle
system\security\framesecuritydescriptor.cs (4)
48
private
SafeAccessTokenHandle
m_callerToken;
51
private
SafeAccessTokenHandle
m_impToken;
204
internal void SetTokenHandles (
SafeAccessTokenHandle
callerToken,
SafeAccessTokenHandle
impToken)
system\security\principal\win32.cs (3)
439
internal static extern int ImpersonateLoggedOnUser (
SafeAccessTokenHandle
hToken);
444
internal static extern int OpenThreadToken (TokenAccessLevels dwDesiredAccess, WinSecurityContext OpenAs, out
SafeAccessTokenHandle
phThreadToken);
454
internal static extern int SetThreadToken(
SafeAccessTokenHandle
hToken);
system\security\principal\windowsidentity.cs (26)
70
static
SafeAccessTokenHandle
s_invalidTokenHandle =
SafeAccessTokenHandle
.InvalidHandle;
76
private
SafeAccessTokenHandle
m_safeTokenHandle =
SafeAccessTokenHandle
.InvalidHandle;
128
internal WindowsIdentity (
SafeAccessTokenHandle
safeTokenHandle) : this (safeTokenHandle.DangerousGetHandle(), null, -1) {
403
SafeAccessTokenHandle
token =
SafeAccessTokenHandle
.InvalidHandle;
426
if (token !=
SafeAccessTokenHandle
.InvalidHandle) {
614
public static void RunImpersonated(
SafeAccessTokenHandle
safeAccessTokenHandle, Action action)
634
public static T RunImpersonated<T>(
SafeAccessTokenHandle
safeAccessTokenHandle, Func<T> func)
704
public
SafeAccessTokenHandle
AccessToken {
726
internal static WindowsImpersonationContext SafeImpersonate (
SafeAccessTokenHandle
userToken, WindowsIdentity wi, ref StackCrawlMark stackMark)
730
SafeAccessTokenHandle
safeTokenHandle = GetCurrentToken(TokenAccessLevels.MaximumAllowed, false, out isImpersonating, out hr);
804
SafeAccessTokenHandle
safeTokenHandle = GetCurrentToken(desiredAccess, threadOnly, out isImpersonating, out hr);
849
private static
SafeAccessTokenHandle
GetCurrentToken(TokenAccessLevels desiredAccess, bool threadOnly, out bool isImpersonating, out int hr) {
851
SafeAccessTokenHandle
safeTokenHandle = GetCurrentThreadToken(desiredAccess, out hr);
864
private static
SafeAccessTokenHandle
GetCurrentProcessToken (TokenAccessLevels desiredAccess, out int hr) {
866
SafeAccessTokenHandle
safeTokenHandle;
875
internal static
SafeAccessTokenHandle
GetCurrentThreadToken(TokenAccessLevels desiredAccess, out int hr) {
876
SafeAccessTokenHandle
safeTokenHandle;
906
SafeAccessTokenHandle
safeTokenHandle = null;
930
private static Win32Native.LUID GetLogonAuthId (
SafeAccessTokenHandle
safeTokenHandle) {
938
private static SafeLocalAllocHandle GetTokenInformation (
SafeAccessTokenHandle
tokenHandle, TokenInformationClass tokenInformationClass) {
979
private unsafe static
SafeAccessTokenHandle
KerbS4ULogon (string upn, ref
SafeAccessTokenHandle
safeTokenHandle)
1165
if (!identity.m_safeTokenHandle.IsInvalid && identity.m_safeTokenHandle !=
SafeAccessTokenHandle
.InvalidHandle && identity.m_safeTokenHandle.DangerousGetHandle() != IntPtr.Zero)
system\security\principal\windowsimpersonationcontext.cs (3)
32
private
SafeAccessTokenHandle
m_safeTokenHandle =
SafeAccessTokenHandle
.InvalidHandle;
42
internal WindowsImpersonationContext (
SafeAccessTokenHandle
safeTokenHandle, WindowsIdentity wi, bool isImpersonating, FrameSecurityDescriptor fsd) {
system\security\principal\windowsprincipal.cs (2)
239
SafeAccessTokenHandle
token =
SafeAccessTokenHandle
.InvalidHandle;
system\security\safesecurityhandles.cs (1)
26
public static
SafeAccessTokenHandle
InvalidHandle
system\security\securitycontext.cs (1)
683
SafeAccessTokenHandle
tokenHandle = targetWI.AccessToken;