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

# AssocQueryStringByKeyA(3w)

## NAME

**AssocQueryStringByKeyA** (SHLWAPI.@)

## SYNOPSIS

HRESULT AssocQueryStringByKeyA\
  (\
   ASSOCF   *cfFlags*,\
   ASSOCSTR *str*,\
   HKEY     *hkAssoc*,\
   LPCSTR   *pszExtra*,\
   LPSTR    *pszOut*,\
   DWORD\*   *pcchOut*\
  )

## DESCRIPTION

Get a file association string from the registry, given a starting key.

## PARAMS

*cfFlags* **\[In\]**  **ASSOCF\_** flags from **"shlwapi.h"**.

*str* **\[In\]**  Type of string to get.

*hkAssoc* **\[In\]**  Key to search below.

*pszExtra* **\[In\]**  Extra information about the string location.

*pszOut* **\[Out\]**  Destination for the association string.

*pcchOut* **\[Out\]**  Length of *pszOut*.

## RETURNS

**Success:** **S\_OK**. *pszOut* contains the string, *pcchOut* contains its length.

**Failure:** An **HRESULT** error code indicating the error.

## IMPLEMENTATION

Declared in **"shlwapi.h"**.

Implemented in **"dlls/shlwapi/assoc.c"**.

Debug channel **"shell"**.
