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

# ImpersonateSelf(3w)

## NAME

**ImpersonateSelf** (ADVAPI32.@)

## SYNOPSIS

BOOL ImpersonateSelf\
  (\
   SECURITY\_IMPERSONATION\_LEVEL *ImpersonationLevel*\
  )

## DESCRIPTION

Makes an impersonation token that represents the process user and assigns to the current thread.

## PARAMS

*ImpersonationLevel* **\[In\]**  Level at which to impersonate.

## RETURNS

**Success:** **TRUE**.

**Failure:** **FALSE**.

## IMPLEMENTATION

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

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

Debug channel **"advapi"**.
