Allows code to impersonate a different Windows user.
[Visual Basic] Overloads Public Shared Function Impersonate( _ ByVal userToken As Integer _ ) As WindowsImpersonationContext [C#] public static WindowsImpersonationContext Impersonate( int userToken ); [C++] public: static WindowsImpersonationContext* Impersonate( int userToken ); [JScript] public static function Impersonate( userToken : int ) : WindowsImpersonationContext;
A WindowsImpersonationContext object representing the Windows user prior to impersonation. This object can be used to revert to the original user's context.
WindowsIdentity Class | WindowsIdentity Members | System.Security.Principal Namespace | WindowsIdentity.Impersonate Overload List