RegGetValueW(3w)

RegGetValueW3w

Usage

LSTATUS RegGetValueW
(
HKEY hKey,
LPCWSTR pszSubKey,
LPCWSTR pszValue,
DWORD dwFlags,
LPDWORD pdwType,
PVOID pvData,
LPDWORD pcbData
)

Overview

Retrieves the type and data for a value name associated with a key, optionally expanding its content and restricting its type.

Params

hKey [In] Handle to an open key.

pszSubKey [In] Name of the subkey of hKey.

pszValue [In] Name of value under hKey/szSubKey to query.

dwFlags [In] Flags restricting the value type to retrieve.

pdwType [Out] Destination for the values type, may be NULL.

pvData [Out] Destination for the values content, may be NULL.

pcbData [In/Out] Size of pvData, updated with the size in bytes required to retrieve the whole content, including the trailing ' ' for strings.

Returns

Success: ERROR_SUCCESS

Failure: nonzero error code from Winerror.h.

Notes

- Unless RRF_NOEXPAND is specified, REG_EXPAND_SZ values are automatically expanded and pdwType is set to REG_SZ instead.

- Restrictions are applied after expanding, using RRF_RT_REG_EXPAND_SZ without RRF_NOEXPAND is thus not allowed. An exception is the case where RRF_RT_ANY is specified, because then RRF_NOEXPAND is allowed.

Implementation

Declared in "shlwapi.h".

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

Debug channel "reg".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.