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

# RegOpenCurrentUser(3w)

## NAME

**RegOpenCurrentUser** (ADVAPI32.@)

## SYNOPSIS

LSTATUS RegOpenCurrentUser\
  (\
   REGSAM *access*,\
   PHKEY  *retkey*\
  )

## DESCRIPTION

Get a handle to the **HKEY\_CURRENT\_USER** key for the user the current thread is impersonating.

## PARAMS

*access* **\[In\]**  Desired *access* rights to the key.

*retkey* **\[Out\]**  Handle to the opened key.

## RETURNS

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

**Failure:** nonzero error code from Winerror.h.

## FIXME

This function is supposed to retrieve a handle to the **HKEY\_CURRENT\_USER** for the user the current thread is impersonating. Since Wine does not currently allow threads to impersonate other users, this stub should work fine.

## IMPLEMENTATION

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

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

Debug channel **"reg"**.
