AdvApi32RegUnLoadKey(SafeRegistryHandle, String) Method
Unloads the specified registry key and its subkeys from the registry.
Applications that back up or restore system state including system files and registry hives
should use the
Volume Shadow Copy service instead of the registry functions.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("AdvApi32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static Win32ErrorCode RegUnLoadKey(
SafeRegistryHandle hKey,
string subKey
)
<DllImportAttribute("AdvApi32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function RegUnLoadKey (
hKey As SafeRegistryHandle,
subKey As String
) As Win32ErrorCode
Dim hKey As SafeRegistryHandle
Dim subKey As String
Dim returnValue As Win32ErrorCode
returnValue = AdvApi32.RegUnLoadKey(hKey,
subKey)
public:
[DllImportAttribute(L"AdvApi32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static Win32ErrorCode RegUnLoadKey(
SafeRegistryHandle^ hKey,
String^ subKey
)
[<DllImportAttribute("AdvApi32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member RegUnLoadKey :
hKey : SafeRegistryHandle *
subKey : string -> Win32ErrorCode
No code example is currently available or this language may not be supported.
- hKey SafeRegistryHandle
-
A handle to the key where the subkey will be unloaded.
- subKey String
-
The name of the subkey to be unloaded.
The key referred to by the subKey parameter must have been created by
using the RegLoadKey(RegistryHive, String, String) function.
Key names are not case sensitive.
Win32ErrorCode
If the function succeeds, the return value is
ERROR_SUCCESS.
If the function fails, the return value is other
Win32ErrorCode error code.
To get extended error information, call
GetLastWin32Error.