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

# RegConnectRegistryW(3w)

## NAME

**RegConnectRegistryW** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegConnectRegistryW\
  (\
   LPCWSTR *lpMachineName*,\
   HKEY    *hKey*,\
   PHKEY   *phkResult*\
  )

## DESCRIPTION

Establish a connection to a predefined registry key on another computer.

## PARAMS

*lpMachineName* **\[In\]**  Address of name of remote computer.

hHey **\[In\]**  Predefined registry handle.

*phkResult* **\[In\]**  Address of buffer for remote registry handle.

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