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

# CryptDuplicateKey(3w)

## NAME

**CryptDuplicateKey** (ADVAPI32.@)

## SYNOPSIS

BOOL CryptDuplicateKey\
  (\
   HCRYPTKEY  *hKey*,\
   DWORD\*     *pdwReserved*,\
   DWORD      *dwFlags*,\
   HCRYPTKEY\* *phKey*\
  )

## DESCRIPTION

Duplicate a key and the key's state.

## PARAMS

*hKey* **\[In\]**  Handle of the key to copy.

*pdwReserved* **\[In\]**  Reserved for future use and must be **NULL**.

*dwFlags* **\[In\]**  Reserved for future use and must be zero.

*phKey* **\[In\]**  Address of the handle to the duplicated key.

## RETURNS

**Success:** **TRUE**

**Failure:** **FALSE**

## IMPLEMENTATION

Declared in **"wincrypt.h"**.

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

Debug channel **"crypt"**.
