 |
RegDeleteKey ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The RegDeleteKey function deletes a subkey, including all of its values. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
LONG RegDeleteKey(
HKEY hKey,
LPCTSTR lpSubKey
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER RegDeleteKey IN advapi32;
INTEGER hKey,;
STRING lpSubKey
|
 |
 |
 |
| Parameters: |
 |
hKey
[in] Handle to an open key.
lpSubKey
[in] Pointer to a null-terminated string specifying the name of the key to be deleted. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is ERROR_SUCCESS (0). |
 |
 |
| My comment: |
 |
The key must have been opened with the DELETE access right.
hKey handle is returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be one of the following predefined keys:
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
The subkey to be deleted must not have subkeys. To delete a key and all its subkeys, you need to recursively enumerate the subkeys and delete them individually. To recursively delete keys, use the SHDeleteKey function. |
 |
 |
| Word Index links for the RegDeleteKey : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-10-18 19:41:48 | | Modified: | 2004-10-18 19:44:59 | Visited in last 7 days: 14 |