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

# RegSetValueW(3w)

## NAME

**RegSetValueW** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegSetValueW\
  (\
   HKEY    *hkey*,\
   LPCWSTR *name*,\
   DWORD   *type*,\
   LPCWSTR *data*,\
   DWORD   *count*\
  )

## DESCRIPTION

Sets the *data* for the default or unnamed value of a reg key.

## PARAMS

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

lpSubKey **\[In\]**  Name of a subkey of hKey.

dwType **\[In\]**  Type of information to store.

lpData **\[In\]**  String that contains the *data* to set for the default value.

cbData **\[In\]**  Ignored.

## RETURNS

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

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

## IMPLEMENTATION

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

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

Debug channel **"reg"**.
