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

# SHCopyKeyA(3w)

## NAME

**SHCopyKeyA** (SHLWAPI.@)

## SYNOPSIS

DWORD SHCopyKeyA\
  (\
   HKEY   *hKeySrc*,\
   LPCSTR *lpszSrcSubKey*,\
   HKEY   *hKeyDst*,\
   DWORD  *dwReserved*\
  )

## DESCRIPTION

Copy a key and its values/sub keys to another location.

## PARAMS

*hKeySrc* **\[In\]**  Source key to copy from.

*lpszSrcSubKey* **\[In\]**  Sub key under *hKeySrc*, or **NULL** to use *hKeySrc* directly.

*hKeyDst* **\[In\]**  Destination key.

*dwReserved* **\[In\]**  Reserved, must be **0.**

## RETURNS

**Success:** **ERROR\_SUCCESS**. The key is copied to the destination key.

**Failure:** A standard Windows(tm) error code.

## NOTES

If *hKeyDst* is a key under *hKeySrc*, this function will misbehave (It will loop until out of stack, or the registry is full). This bug is present in Win32 also.

## IMPLEMENTATION

Declared in **"shlwapi.h"**.

Implemented in **"dlls/shlwapi/reg.c"**.

Debug channel **"shell"**.
