Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CurrentImpersonatedTokenChanged()

static void System.Security.Principal.WindowsIdentity.CurrentImpersonatedTokenChanged ( AsyncLocalValueChangedArgs< SafeAccessTokenHandle > args)
inlinestaticprivate

Definition at line 657 of file WindowsIdentity.cs.

658 {
659 if (args.ThreadContextChanged)
660 {
661 if (!global::Interop.Advapi32.RevertToSelf())
662 {
663 Environment.FailFast(new Win32Exception().Message);
664 }
665 if (args.CurrentValue != null && !args.CurrentValue.IsInvalid && !global::Interop.Advapi32.ImpersonateLoggedOnUser(args.CurrentValue))
666 {
667 Environment.FailFast(new Win32Exception().Message);
668 }
669 }
670 }

References System.Environment.FailFast().