---
name: "RegDeleteKeyA"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/RegDeleteKeyA"
---

# RegDeleteKeyA(3w)

## NAME

**RegDeleteKeyA** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegDeleteKeyA\
  (\
   HKEY   *hkey*,\
   LPCSTR *name*\
  )

## DESCRIPTION

Delete a registry key.

## PARAMS

*hkey* **\[In\]**  Handle to parent key containing the key to delete.

*name* **\[In\]**  Name of the key user *hkey* to delete.

## NOTES

**MSDN** is wrong when it says that *hkey* must be opened with the **DELETE** access right. In reality, it opens a new handle with **DELETE** access.

## RETURNS

**Success:** **ERROR\_SUCCESS**

**Failure:** Error code

## IMPLEMENTATION

Declared in **"winreg.h"**.

Implemented in **"dlls/advapi32/registry.c"**.

Debug channel **"reg"**.
