CreateThread function kernel32

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

Creates a thread to execute within the virtual address space of the calling process.

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

Implementation

int CreateThread(
        Pointer<SECURITY_ATTRIBUTES> lpThreadAttributes,
        int dwStackSize,
        Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress,
        Pointer lpParameter,
        int dwCreationFlags,
        Pointer<Uint32> lpThreadId) =>
    _CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter,
        dwCreationFlags, lpThreadId);