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

# CreateRemoteThread(3w)

## NAME

**CreateRemoteThread** (KERNEL32.@)

## SYNOPSIS

HANDLE CreateRemoteThread\
  (\
   HANDLE                 *hProcess*,\
   SECURITY\_ATTRIBUTES\*   *sa*,\
   SIZE\_T                 *stack*,\
   LPTHREAD\_START\_ROUTINE *start*,\
   LPVOID                 *param*,\
   DWORD                  *flags*,\
   LPDWORD                *id*\
  )

## DESCRIPTION

Creates a thread that runs in the address space of another process.

## PARAMS

## RETURNS

**Success:** Handle to the new thread.

**Failure:** **NULL**. Use **[GetLastError(3w)](/GetLastError/3w.md)** to find the error cause.

## BUGS

Improper memory allocation: there's no ability to free new\_thread\_info in other process. Bad *start* address for RtlCreateUserThread because the library may be loaded at different address in other process.

## IMPLEMENTATION

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

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

Debug channel **"thread"**.
