Deletes a subkey and its values. Note that key names are not case sensitive.
- 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.
MFiles.VAF (in MFiles.VAF.dll) Version: 188.8.131.52 (184.108.40.206)
[DllImportAttribute("Advapi32.dll", EntryPoint = "RegDeleteKeyW", CharSet = CharSet.Auto)]
public static int RegDeleteKey(
- Type: SystemUIntPtr
A handle to an open registry key. The access rights of this key do not affect the delete operation. For more information about access rights, see Registry Key Security and Access Rights.
This handle is returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be one of the following Predefined Keys:
- Type: SystemString
The name of the key to be deleted. It must be a subkey of the key that hKey identifies,
but it cannot have subkeys
- This parameter cannot be NULL.
- The function opens the subkey with the DELETE access right.
- Key names are not case sensitive.
- For more information, see Registry Element Size Limits.
- If the function succeeds, the return value is ERROR_SUCCESS.
- If the function fails, the return value is a nonzero error code defined in Winerror.h.
To get a generic description of the error, you can use the FormatMessage function with the