RegDeleteKeyEx (advapi32)
Last changed: Colin-130.15.48.250

.
Summary
The RegDeleteKeyEx function deletes a subkey from the specified platform-specific view of the registry. Use only on 64-bit Operating Systems.

C# Signature:

[DllImport("advapi32.dll", EntryPoint = "RegDeleteKeyEx", SetLastError = true)]
public static extern int RegDeleteKeyEx(
    UIntPtr hKey,
    string lpSubKey,
    uint samDesired, // see Notes below
    uint Reserved);

VB Signature:

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

User-Defined Types:

None.

Alternative Managed API:

Microsoft.Win32.RegistryKey.DeleteSubKey() (the non-WOW64 version)

Notes:

Use only on 64-bit operating systems!

samDesired values:

Value Meaning
KEY_WOW64_32KEY 0x0200 Delete the key from the 32-bit registry view.
KEY_WOW64_64KEY 0x0100 Delete the key from the 64-bit registry view.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation