Registry_DeleteKey()

Examples


The Registry_DeleteKey() function deletes the specified key from the registry.

Syntax

Registry_DeleteKey(subtree, key {, error_code})

Parameters

subtree – An integer specifying the registry subtree. The value corresponds to one of the following constants:

[spacer]

Constant

Description

REGKEY_CLASSES_ROOT

HKEY_CLASSES_ROOT subtree

REGKEY_CURRENT_USER

HKEY_CURRENT_USER subtree

REGKEY_LOCAL_MACHINE

HKEY_LOCAL_MACHINE subtree

REGKEY_CURRENT_CONFIG

HKEY_CURRENT_CONFIG subtree


key – A string specifying the path of the key to delete from the registry. The key cannot have any subkeys. If it does, you must delete the subkeys first.

error_code – An optional returned long integer that contains the error code that was returned. The error codes are defined in the WinError.h file of the Windows SDK.

Return value

A boolean indicating the result. The value true indicates the function succeeded, while false indicates it did not.


Documentation Feedback