Share via


RegistryProxy.CurrentConfig 屬性

定義

傳回 RegistryKey 型別,此型別可提供 HKEY_CURRENT_CONFIG 的存取。

public:
 property Microsoft::Win32::RegistryKey ^ CurrentConfig { Microsoft::Win32::RegistryKey ^ get(); };
public Microsoft.Win32.RegistryKey CurrentConfig { get; }
member this.CurrentConfig : Microsoft.Win32.RegistryKey
Public ReadOnly Property CurrentConfig As RegistryKey

屬性值

RegistryKey

範例

這個範例會建立子機碼 MyDeviceSettings

My.Computer.Registry.CurrentConfig.CreateSubKey("MyDeviceSettings")

備註

HKEY_CURRENT_CONFIG 主要用來儲存電腦上的裝置設定。

命名空間 RegistryPermission 中的 System.Security.Permissions 類別會控制登錄變數的存取權。 您不應將登錄變數儲存在記憶體位置,因為不具備 RegistryPermission 的程式碼亦可存取這個位置。 同樣地,授與許可權時,只授與完成作業所需的許可權。

登錄權限存取值是由 RegistryPermissionAccess 列舉定義。 下表會詳細說明其成員。

說明
AllAccess 建立、讀取和寫入登錄變數的存取權。
建立 建立登錄變數的存取權限。
NoAccess 不允許存取登錄變數。
讀取 登錄變數的讀取存取。
寫入 登錄變數的寫入存取。

下表列出與 My.Computer.Registry 物件相關的工作範例。

收件者 請參閱
建立登錄機碼並設定其值 作法:建立登錄機碼並設定其值
刪除登錄機碼 作法:刪除登錄機碼
從登錄機碼讀取值 作法:讀取登錄機碼的值

適用於

另請參閱