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

# SfcIsKeyProtected(3w)

## NAME

**SfcIsKeyProtected** (SFC\_OS.@)

## SYNOPSIS

BOOL SfcIsKeyProtected\
  (\
   HKEY    *hKey*,\
   LPCWSTR *lpSubKey*,\
   REGSAM  *samDesired*\
  )

## DESCRIPTION

Check, if the given Registry Key is protected by the System.

## PARAMS

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

*lpSubKey* **\[In\]**  Name of the subkey to check.

*samDesired* **\[In\]**  The Registry View to Examine (**32** or **64** bit).

## RETURNS

**Failure:** **FALSE** with **[GetLastError(3w)](/GetLastError/3w.md)** != **ERROR\_FILE\_NOT\_FOUND**

**Success:** **TRUE**, when the Key is Protected **FALSE** with **[GetLastError(3w)](/GetLastError/3w.md)** == **ERROR\_FILE\_NOT\_FOUND**, when the Key is not Protected

## IMPLEMENTATION

Declared in **"sfc.h"**.

Implemented in **"dlls/sfc\_os/sfc\_os.c"**.

Debug channel **"sfc"**.
