AdvApi32RegRenameKey(SafeRegistryHandle, String, String) Method

Renames a registry subkey.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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 RegRenameKey(
	SafeRegistryHandle hKey,
	string srcSubKeyPathOrName,
	string dstSubkeyName
)

Parameters

hKey  SafeRegistryHandle
A handle to the source registry rootkey or subkey.
srcSubKeyPathOrName  String
The relative path or the name of the source subkey. (eg. "SOFTWARE\My Old SubKey" or "My Old SubKey")
dstSubkeyName  String
The destination name of the subkey. (eg. "My New SubKey")

Return Value

Win32ErrorCode
Returns 0 (zero) if successful; otherwise, a Win32 system error code.

Remarks

This function is not documented, but it internaly calls NtRenameKey function:

https://msdn.microsoft.com/en-us/library/cc512138.aspx

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also