C# Class mCleaner.Helpers.Permissions

显示文件 Open project: MicroHealthLLC/mCleaner

Public Methods

Method Description
SetPrivilege ( string privilege, bool enabled ) : bool
SetPrivileges ( bool Enabled ) : void

Private Methods

Method Description
AdjustTokenPrivileges ( IntPtr htok, bool disall, TokPriv1Luid &newst, int len, IntPtr prev, IntPtr relen ) : bool
CloseHandle ( IntPtr handle ) : bool
LookupPrivilegeValue ( string host, string name, long &pluid ) : bool
OpenProcessToken ( IntPtr h, int acc, IntPtr &phtok ) : bool

Method Details

SetPrivilege() public static method

public static SetPrivilege ( string privilege, bool enabled ) : bool
privilege string
enabled bool
return bool

SetPrivileges() public static method

public static SetPrivileges ( bool Enabled ) : void
Enabled bool
return void