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

# SHRegCreateUSKeyA(3w)

## NAME

**SHRegCreateUSKeyA** (SHLWAPI.@)

## SYNOPSIS

LONG SHRegCreateUSKeyA\
  (\
   LPCSTR  *pszPath*,\
   REGSAM  *samDesired*,\
   HUSKEY  *hRelativeUSKey*,\
   PHUSKEY *phNewUSKey*,\
   DWORD   *dwFlags*\
  )

## DESCRIPTION

Create or open a user-specific registry key.

## PARAMS

*pszPath* **\[In\]**  Key name to create or open.

*samDesired* **\[In\]**  Wanted security access.

*hRelativeUSKey* **\[In\]**  Base path if *pszPath* is relative. **NULL** otherwise.

*phNewUSKey* **\[Out\]**  Receives a handle to the new or opened key.

*dwFlags* **\[In\]**  Base key under which the key should be opened.

## RETURNS

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

**Failure:** Nonzero error code from Winerror.h

## IMPLEMENTATION

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

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

Debug channel **"shell"**.
