RegistryKey.OpenBaseKey(RegistryHive, RegistryView) 方法

定義

使用指定的檢視,開啟本機電腦上表示要求機碼的新 RegistryKeyOpens a new RegistryKey that represents the requested key on the local machine with the specified view.

public:
 static Microsoft::Win32::RegistryKey ^ OpenBaseKey(Microsoft::Win32::RegistryHive hKey, Microsoft::Win32::RegistryView view);
[System.Runtime.InteropServices.ComVisible(false)]
public static Microsoft.Win32.RegistryKey OpenBaseKey (Microsoft.Win32.RegistryHive hKey, Microsoft.Win32.RegistryView view);
static member OpenBaseKey : Microsoft.Win32.RegistryHive * Microsoft.Win32.RegistryView -> Microsoft.Win32.RegistryKey
Public Shared Function OpenBaseKey (hKey As RegistryHive, view As RegistryView) As RegistryKey

參數

hKey
RegistryHive

要開啟的 HKEY。The HKEY to open.

view
RegistryView

要使用的登錄檢視。The registry view to use.

傳回

要求的登錄機碼。The requested registry key.

屬性

例外狀況

hKeyview 無效。hKey or view is invalid.

使用者沒有必要的登錄權限。The user does not have the necessary registry rights.

使用者沒有執行此動作所需的權限。The user does not have the permissions required to perform this action.

適用於