RegistryKey.GetAccessControl 方法

定義

傳回目前登錄機碼的存取控制安全性。

多載

GetAccessControl()

傳回目前登錄機碼的存取控制安全性。

GetAccessControl(AccessControlSections)

傳回目前登錄機碼之存取控制安全性的指定區段。

GetAccessControl()

來源:
RegistryKey.cs

傳回目前登錄機碼的存取控制安全性。

public:
 System::Security::AccessControl::RegistrySecurity ^ GetAccessControl();
public System.Security.AccessControl.RegistrySecurity GetAccessControl ();
member this.GetAccessControl : unit -> System.Security.AccessControl.RegistrySecurity
Public Function GetAccessControl () As RegistrySecurity

傳回

物件,描述由目前 RegistryKey 所表示之登錄機碼上的存取控制權限。

例外狀況

使用者沒有必要的使用權限。

正接受管理的 RegistryKey 已經關閉 (關閉的機碼無法存取)。

目前的機碼已經刪除。

備註

這個方法多載相當於使用下列旗標的位元組合呼叫 GetAccessControl(AccessControlSections) 方法多載: AccessControlSections.AccessAccessControlSections.OwnerAccessControlSections.Group。 您可以使用該多載來搜尋其他許可權。

用戶必須具有 RegistryRights.ReadPermissions 呼叫這個方法的許可權。

適用於

GetAccessControl(AccessControlSections)

來源:
RegistryKey.cs

傳回目前登錄機碼之存取控制安全性的指定區段。

public:
 System::Security::AccessControl::RegistrySecurity ^ GetAccessControl(System::Security::AccessControl::AccessControlSections includeSections);
public System.Security.AccessControl.RegistrySecurity GetAccessControl (System.Security.AccessControl.AccessControlSections includeSections);
member this.GetAccessControl : System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.RegistrySecurity
Public Function GetAccessControl (includeSections As AccessControlSections) As RegistrySecurity

參數

includeSections
AccessControlSections

列舉值的位元組合,指定要取得的安全性資訊型別。

傳回

物件,描述由目前 RegistryKey 所表示之登錄機碼上的存取控制權限。

例外狀況

使用者沒有必要的使用權限。

正接受管理的 RegistryKey 已經關閉 (關閉的機碼無法存取)。

目前的機碼已經刪除。

備註

若要要求目前授與使用者的訪問權限,請指定下列旗標的位元組合: AccessControlSections.AccessAccessControlSections.OwnerAccessControlSections.Group。 或者,您可以使用 GetAccessControl() 方法多載,其指定值的組合。

用戶必須具有 RegistryRights.ReadPermissions 呼叫這個方法的許可權。

適用於