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

# GetUserNameA(3w)

## NAME

**GetUserNameA** (ADVAPI32.@)

## SYNOPSIS

BOOL GetUserNameA\
  (\
   LPSTR   *lpszName*,\
   LPDWORD *lpSize*\
  )

## DESCRIPTION

Get the current user name.

## PARAMS

*lpszName* **\[Out\]**  Destination for the user name.

*lpSize* **\[In/Out\]**  Size of *lpszName*.

## RETURNS

**Success:** The length of the user name, including terminating **NUL**.

**Failure:** **ERROR\_MORE\_DATA** if \**lpSize* is too small.

## IMPLEMENTATION

Declared in **"winbase.h"**.

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

Debug channel **"advapi"**.
