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

# OpenProcess(3w)

## NAME

**OpenProcess** (KERNEL32.@)

## SYNOPSIS

HANDLE OpenProcess\
  (\
   DWORD *access*,\
   BOOL  *inherit*,\
   DWORD *id*\
  )

## DESCRIPTION

Opens a handle to a process.

## PARAMS

*access* **\[In\]**  Desired *access* rights assigned to the returned handle.

*inherit* **\[In\]**  Determines whether or not child processes will *inherit* the handle.

*id* **\[In\]**  Process identifier of the process to get a handle to.

## RETURNS

**Success:** Valid handle to the specified process.

**Failure:** **NULL**, check **[GetLastError(3w)](/GetLastError/3w.md)**.

## IMPLEMENTATION

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

Implemented in **"dlls/kernel32/process.c"**.

Debug channel **"process"**.
