System.Win.ComObj.DeleteRegKey

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DeleteRegKey(const Key: string; RootKey: HKEY);

C++

extern DELPHI_PACKAGE void __fastcall DeleteRegKey(const System::UnicodeString Key, HKEY RootKey = (HKEY)(0x80000000));

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Win.ComObj.pas
System.Win.ComObj.hpp
System.Win.ComObj System.Win.ComObj

Description

Deletes a single key that is a subkey of HKEY_CLASSES_ROOT from the system registry.

Use DeleteRegKey to update the system registry.

Note: DeleteRegKey is useful for implementing the UpdateRegistry method of a class factory.

DeleteRegKey deletes the subkey of RootKey that is passed in as the Key parameter.

Key must specify a null-terminated string, which is the name of the key to delete. It cannot be NULL. The Key to delete must not have subkeys.

RootKey is the top-level key under which the key to delete appears. It defaults to HKEY_CLASSES_ROOT.

If DeleteRegKey succeeds it removes the entire specified key from the registry, including all of its values. An exception is raised if it fails.

See Also