C# 클래스 Opc.Ua.Configuration.LocalSecurityPolicy

Allows to add privileges to Local Security Policy. You can use this class to add the LogOn as service privilege to an account.
상속: IDisposable
파일 보기 프로젝트 열기: OPCFoundation/UA-.NET 1 사용 예제들

공개 메소드들

메소드 설명
AddLogonAsServicePrivilege ( string account ) : void

Add the privilege for the given account to logon as service.

AddPrivilege ( string account, string privilege ) : void

Add privileges for the given account

Dispose ( ) : void

Release all unmanaged resources.

LocalSecurityPolicy ( ) : System

Constructor for LocalSecurityPolicy

LocalSecurityPolicy ( string systemName ) : System

Constructor for LocalSecurityPolicy

비공개 메소드들

메소드 설명
FreeSid ( IntPtr pSid ) : void
GetLastError ( ) : int
GetSIDInformation ( string account ) : IntPtr
InitLsaString ( string s ) : LSA_UNICODE_STRING
IsValidSid ( IntPtr pSid ) : bool
LookupAccountName ( string lpSystemName, string lpAccountName, IntPtr psid, int &cbsid, StringBuilder domainName, int &cbdomainLength, int &use ) : bool
LsaAddAccountRights ( IntPtr PolicyHandle, IntPtr AccountSid, LSA_UNICODE_STRING UserRights, long CountOfRights ) : long
LsaClose ( IntPtr ObjectHandle ) : long
LsaNtStatusToWinError ( long status ) : long
LsaOpenPolicy ( LSA_UNICODE_STRING &SystemName, LSA_OBJECT_ATTRIBUTES &ObjectAttributes, Int32 DesiredAccess, IntPtr &PolicyHandle ) : UInt32

메소드 상세

AddLogonAsServicePrivilege() 공개 메소드

Add the privilege for the given account to logon as service.
public AddLogonAsServicePrivilege ( string account ) : void
account string The account name (domain\userName)
리턴 void

AddPrivilege() 공개 메소드

Add privileges for the given account
public AddPrivilege ( string account, string privilege ) : void
account string The account name (domain\userName)
privilege string The name of the privilege to add
리턴 void

Dispose() 공개 메소드

Release all unmanaged resources.
public Dispose ( ) : void
리턴 void

LocalSecurityPolicy() 공개 메소드

Constructor for LocalSecurityPolicy
public LocalSecurityPolicy ( ) : System
리턴 System

LocalSecurityPolicy() 공개 메소드

Constructor for LocalSecurityPolicy
public LocalSecurityPolicy ( string systemName ) : System
systemName string local system if systemName is null
리턴 System