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

# RegQueryInfoKeyA(3w)

## NAME

**RegQueryInfoKeyA** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegQueryInfoKeyA\
  (\
   HKEY      *hkey*,\
   LPSTR     *class*,\
   LPDWORD   *class\_len*,\
   LPDWORD   *reserved*,\
   LPDWORD   *subkeys*,\
   LPDWORD   *max\_subkey*,\
   LPDWORD   *max\_class*,\
   LPDWORD   *values*,\
   LPDWORD   *max\_value*,\
   LPDWORD   *max\_data*,\
   LPDWORD   *security*,\
   FILETIME\* *modif*\
  )

## DESCRIPTION

Retrieves information about a registry key.

## PARAMS

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

lpClass **\[Out\]**  Class string of the key.

lpcClass **\[In/Out\]**  size of lpClass.

lpReserved **\[In\]**  Reserved; must be **NULL**.

lpcSubKeys **\[Out\]**  Number of *subkeys* contained by the key.

lpcMaxSubKeyLen **\[Out\]**  Size of the key's subkey with the longest name.

lpcMaxClassLen **\[Out\]**  Size of the longest string specifying a subkey *class* in **TCHARS**.

lpcValues **\[Out\]**  Number of *values* associated with the key.

lpcMaxValueNameLen **\[Out\]**  Size of the key's longest value name in **TCHARS**.

lpcMaxValueLen **\[Out\]**  Longest data component among the key's *values*.

lpcbSecurityDescriptor **\[Out\]**  Size of the key's *security* descriptor.

lpftLastWriteTime **\[Out\]**  **FILETIME** structure that is the last write time.

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