NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

WindowsIdentity.Impersonate (Int32)

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;

Parameters

userToken
Handle of a Windows account token

Return Value

A WindowsImpersonationContext object representing the Windows user prior to impersonation. This object can be used to revert to the original user's context.

See Also

WindowsIdentity Class | WindowsIdentity Members | System.Security.Principal Namespace | WindowsIdentity.Impersonate Overload List