CreateRemoteThreadEx function kernel32

int CreateRemoteThreadEx(
  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<NativeType> lpAttributeList,
  8. Pointer<Uint32> lpThreadId,
)

Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.

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

Implementation

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