DWORD _RegDeleteKey(HKEY hKey, LPSTR lpszSubKey)
Deletes the given registry key including its subkeys from the registry database.
This service also marks all other open references to the key being deleted as deleted, so that all accesses through these other open references will fail with an ERROR_KEY_DELETED error. But a virtual device could create a new key with the same name, even before these open references are closed, without any conflict.