C# 클래스 projectBM.impersonate

상속: IDisposable
파일 보기 프로젝트 열기: zettasolutions/projectBM

공개 메소드들

메소드 설명
Dispose ( ) : void
impersonate ( ) : System
impersonate ( string domainName, string userName, string password ) : System

Constructor. Starts the impersonation with the given credentials. Please note that the account that instantiates the Impersonator class needs to have the 'Act as part of operating system' privilege set.

비공개 메소드들

메소드 설명
CloseHandle ( IntPtr handle ) : bool
DuplicateToken ( IntPtr hToken, int impersonationLevel, IntPtr &hNewToken ) : int
ImpersonateValidUser ( string domain, string userName, string password ) : void

Does the actual impersonation.

LogonUser ( string lpszUserName, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr &phToken ) : int
RevertToSelf ( ) : bool
UndoImpersonation ( ) : void

Reverts the impersonation.

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

impersonate() 공개 메소드

public impersonate ( ) : System
리턴 System

impersonate() 공개 메소드

Constructor. Starts the impersonation with the given credentials. Please note that the account that instantiates the Impersonator class needs to have the 'Act as part of operating system' privilege set.
public impersonate ( string domainName, string userName, string password ) : System
domainName string The domain name of the user to act as.
userName string The name of the user to act as.
password string The password of the user to act as.
리턴 System