CreateThread method

Pointer<Void> CreateThread(
  1. Pointer<LPSECURITY_ATTRIBUTES> lpThreadAttributes,
  2. int dwStackSize,
  3. Pointer<NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress,
  4. Pointer<Void> lpParameter,
  5. int dwCreationFlags,
  6. Pointer<Uint64> lpThreadId,
)

Implementation

ffi.Pointer<ffi.Void> CreateThread(
  ffi.Pointer<LPSECURITY_ATTRIBUTES> lpThreadAttributes,
  int dwStackSize,
  ffi.Pointer<ffi.NativeFunction<LPTHREAD_START_ROUTINE>> lpStartAddress,
  ffi.Pointer<ffi.Void> lpParameter,
  int dwCreationFlags,
  ffi.Pointer<ffi.Uint64> lpThreadId,
) {
  return (_CreateThread ??= _dylib
      .lookupFunction<_c_CreateThread, _dart_CreateThread>('CreateThread'))(
    lpThreadAttributes,
    dwStackSize,
    lpStartAddress,
    lpParameter,
    dwCreationFlags,
    lpThreadId,
  );
}