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

# RegGetKeySecurity(3w)

## NAME

**RegGetKeySecurity** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegGetKeySecurity\
  (\
   HKEY                 *hkey*,\
   SECURITY\_INFORMATION *SecurityInformation*,\
   PSECURITY\_DESCRIPTOR *pSecurityDescriptor*,\
   LPDWORD              *lpcbSecurityDescriptor*\
  )

## DESCRIPTION

Get a copy of the security descriptor for a given registry key.

## PARAMS

*hkey* **\[In\]**  Open handle of key to set.

*SecurityInformation* **\[In\]**  Descriptor contents.

*pSecurityDescriptor* **\[Out\]**  Address of descriptor for key.

*lpcbSecurityDescriptor* **\[In/Out\]**  Address of size of buffer and description.

## RETURNS

**Success:** **ERROR\_SUCCESS**

**Failure:** Error code

## IMPLEMENTATION

Declared in **"winreg.h"**.

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

Debug channel **"reg"**.
