RegDeleteKey (advapi32)
Last changed: Colin-130.15.48.250

.
Summary
Deletes a subkey and its values. Note that key names are not case sensitive.

C# Signature:

[DllImport("advapi32.dll", EntryPoint="RegDeleteKey", SetLastError=true)]
static extern int RegDeleteKey(
    UIntPtr hKey, // Handle to an open registry key
    [MarshalAs(UnmanagedType.LPWStr)] string lpSubKey); // The name of the key to be deleted.

VB Signature:

Declare Function RegDeleteKey Lib "advapi32.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

Microsoft.Win32.RegistryKey.DeleteSubKey()

Notes:

64-bit Windows:' On WOW64, 32-bit applications view a registry tree that is separate from the registry tree that 64-bit applications view. To enable an application to delete an entry in the alternate registry view, use the RegDeleteKeyEx function.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation