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

# SHRegSetUSValueA(3w)

## NAME

**SHRegSetUSValueA** (SHLWAPI.@)

## SYNOPSIS

LONG SHRegSetUSValueA\
  (\
   LPCSTR *pszSubKey*,\
   LPCSTR *pszValue*,\
   DWORD  *dwType*,\
   LPVOID *pvData*,\
   DWORD  *cbData*,\
   DWORD  *dwFlags*\
  )

## DESCRIPTION

Set a user-specific registry value.

## PARAMS

*pszSubKey* **\[In\]**  Name of key to set the value in.

*pszValue* **\[In\]**  Name of value under *pszSubKey* to set the value in.

*dwType* **\[In\]**  Type of the value.

*pvData* **\[In\]**  Data to set as the value.

*cbData* **\[In\]**  length of *pvData*.

*dwFlags* **\[In\]**  **SHREGSET\_** flags from **"shlwapi.h"**.

## RETURNS

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

**Failure:** An error code from **[SHRegOpenUSKeyA(3w)](/SHRegOpenUSKeyA/3w.md)** or **[SHRegWriteUSValueA(3w)](/SHRegWriteUSValueA/3w.md)**, or **ERROR\_INVALID\_FUNCTION** if *pvData* is **NULL**.

## NOTES

This function opens *pszSubKey*, sets the value, and then closes the key.

## IMPLEMENTATION

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

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

Debug channel **"shell"**.
