共用方式為


RegistryAclExtensions.SetAccessControl(RegistryKey, RegistrySecurity) 方法

定義

變更現有登錄機碼的安全性屬性。

public:
[System::Runtime::CompilerServices::Extension]
 static void SetAccessControl(Microsoft::Win32::RegistryKey ^ key, System::Security::AccessControl::RegistrySecurity ^ registrySecurity);
public static void SetAccessControl (this Microsoft.Win32.RegistryKey key, System.Security.AccessControl.RegistrySecurity registrySecurity);
static member SetAccessControl : Microsoft.Win32.RegistryKey * System.Security.AccessControl.RegistrySecurity -> unit
<Extension()>
Public Sub SetAccessControl (key As RegistryKey, registrySecurity As RegistrySecurity)

參數

key
RegistryKey

現有的登錄機碼。

registrySecurity
RegistrySecurity

要套用至登錄機碼的安全性資訊。

適用於