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

# RegSetValueExW(3w)

## NAME

**RegSetValueExW** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegSetValueExW\
  (\
   HKEY        *hkey*,\
   LPCWSTR     *name*,\
   DWORD       *reserved*,\
   DWORD       *type*,\
   CONST BYTE\* *data*,\
   DWORD       *count*\
  )

## DESCRIPTION

Set the *data* and contents of a registry value.

## PARAMS

*hkey* **\[In\]**  Handle of key to set value for.

*name* **\[In\]**  Name of value to set.

*reserved* **\[In\]**  Reserved, must be zero.

*type* **\[In\]**  Type of the value being set.

*data* **\[In\]**  The new contents of the value to set.

*count* **\[In\]**  Size of *data*.

## RETURNS

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

**Failure:** Error code

## IMPLEMENTATION

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

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

Debug channel **"reg"**.
