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

# SHCreatePropertyBagOnRegKey(3w)

## NAME

**SHCreatePropertyBagOnRegKey** (SHLWAPI.471)

## SYNOPSIS

HRESULT SHCreatePropertyBagOnRegKey\
  (\
   HKEY    *hKey*,\
   LPCWSTR *subkey*,\
   DWORD   *grfMode*,\
   REFIID  *riid*,\
   void\*\*  *ppv*\
  )

## DESCRIPTION

Creates a property bag from a registry key.

## PARAMS

*hKey* **\[In\]**  Handle to the desired registry key.

*subkey* **\[In\]**  Name of desired *subkey*, or **NULL** to open *hKey* directly.

*grfMode* **\[In\]**  Optional flags.

*riid* **\[In\]**  **IID** of requested property bag interface.

*ppv* **\[Out\]**  Address to receive pointer to the new interface.

## RETURNS

**success:** **0**

**failure:** error code

## IMPLEMENTATION

Exported by ordinal only. Use **[GetProcAddress(3w)](/GetProcAddress/3w.md)** to obtain a pointer to the function.

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

Debug channel **"shell"**.
