RegistryKey.GetAccessControl 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳目前登錄檔金鑰的存取控制安全性。
多載
| 名稱 | Description |
|---|---|
| GetAccessControl() |
回傳目前登錄檔金鑰的存取控制安全性。 |
| GetAccessControl(AccessControlSections) |
回傳目前登錄檔金鑰的存取控制安全性指定區段。 |
GetAccessControl()
回傳目前登錄檔金鑰的存取控制安全性。
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.Access、 AccessControlSections.Owner、 AccessControlSections.Group和 。 你可以利用這個過載來搜尋其他權限。
使用者必須擁有 RegistryRights.ReadPermissions 呼叫此方法的權利。
適用於
GetAccessControl(AccessControlSections)
回傳目前登錄檔金鑰的存取控制安全性指定區段。
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.Access、、 AccessControlSections.OwnerAccessControlSections.Group和 。 或者,你也可以使用 GetAccessControl() 方法超載,它精確指定了該組合的值。
使用者必須擁有 RegistryRights.ReadPermissions 呼叫此方法的權利。