C# Класс projectBM.impersonate

Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
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