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

# RegCreateKeyW(3w)

## NAME

**RegCreateKeyW** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegCreateKeyW\
  (\
   HKEY    *hkey*,\
   LPCWSTR *lpSubKey*,\
   PHKEY   *phkResult*\
  )

## DESCRIPTION

Creates the specified reg key.

## PARAMS

hKey **\[In\]**  Handle to an open key.

*lpSubKey* **\[In\]**  Name of a key that will be opened or created.

*phkResult* **\[Out\]**  Receives a handle to the opened or created key.

## RETURNS

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

**Failure:** nonzero error code defined in Winerror.h

## IMPLEMENTATION

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

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

Debug channel **"reg"**.
