_RegDeleteKey


include vmm.h

LONG _RegDeleteKey(HKEY hkey, LPTSTR lpszSubKey)

Deletes the specified key. Do not use this service to delete a key that has subkeys. See the documentation for the Win32 function of the same name for additional information.

ERROR_FILE_NOT_FOUND

ERROR_KEY_DELETED

ERROR_REGISTRY_IO_FAILED

ERROR_REGISTRY_CORRUPT

ERROR_BADDB


hkey

Handle of an open key or one of the predefined keys:

HKEY_CLASSES_ROOT

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE

HKEY_USERS

HKEY_CURRENT_CONFIG

HKEY_DYN_DATA


lpszSubKey

Address of null-terminated string specifying the name of the key to delete.

Of the predefined key values, only HKEY_LOCAL_MACHINE is available to VxDs during VxD initialization time. The entire registry space can only be accessed after VxD initialization is complete.

See also _RegCreateKey