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

# RegQueryValueW(3w)

## NAME

**RegQueryValueW** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegQueryValueW\
  (\
   HKEY    *hkey*,\
   LPCWSTR *name*,\
   LPWSTR  *data*,\
   LPLONG  *count*\
  )

## DESCRIPTION

Retrieves the *data* associated with the default or unnamed value of a key.

## PARAMS

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

*name* **\[In\]**  Name of the subkey of hKey.

*data* **\[Out\]**  Receives the string associated with the default value of the key.

*count* **\[In/Out\]**  Size of lpValue in bytes.

## 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"**.
