CreateRemoteThread function kernel32

int CreateRemoteThread(
  1. int hProcess,
  2. Pointer<SECURITY_ATTRIBUTES> lpThreadAttributes,
  3. int dwStackSize,
  4. Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress,
  5. Pointer<NativeType> lpParameter,
  6. int dwCreationFlags,
  7. Pointer<Uint32> lpThreadId
)

Creates a thread that runs in the virtual address space of another process. Use the CreateRemoteThreadEx function to create a thread that runs in the virtual address space of another process and optionally specify extended attributes.

HANDLE CreateRemoteThread(
  HANDLE hProcess,
  LPSECURITY_ATTRIBUTES lpThreadAttributes,
  SIZE_T dwStackSize,
  LPTHREAD_START_ROUTINE lpStartAddress,
  LPVOID lpParameter,
  DWORD dwCreationFlags,
  LPDWORD lpThreadId
);

Implementation

int CreateRemoteThread(
        int hProcess,
        Pointer<SECURITY_ATTRIBUTES> lpThreadAttributes,
        int dwStackSize,
        Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress,
        Pointer lpParameter,
        int dwCreationFlags,
        Pointer<Uint32> lpThreadId) =>
    _CreateRemoteThread(hProcess, lpThreadAttributes, dwStackSize,
        lpStartAddress, lpParameter, dwCreationFlags, lpThreadId);