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

# RegSaveKeyW(3w)

## NAME

**RegSaveKeyW** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegSaveKeyW\
  (\
   HKEY                  *hkey*,\
   LPCWSTR               *file*,\
   LPSECURITY\_ATTRIBUTES *sa*\
  )

## DESCRIPTION

Save a key and all of its subkeys and values to a new *file* in the standard format.

## PARAMS

*hkey* **\[In\]**  Handle of key where save begins.

lpFile **\[In\]**  Address of filename to save to.

*sa* **\[In\]**  Address of security structure.

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