> For the complete documentation index, see [llms.txt](https://www.pinvoke.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pinvoke.dev/ntdll/ntopenprocess.md).

# NtOpenProcess

```csharp
[DllImport("ntdll.dll", ExactSpelling = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe NTSTATUS NtOpenProcess(
    HANDLE* ProcessHandle,
    uint DesiredAccess,
    OBJECT_ATTRIBUTES* ObjectAttributes,
    CLIENT_ID* ClientId);
```

[PROCESS\_ACCESS\_RIGHTS](/threading/process_access_rights.md)

[OBJECT\_ATTRIBUTES](/foundation/object_attributes.md)

[CLIENT\_ID](/foundation/client_id.md)
