CreateRemoteThread method

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

Implementation

ffi.Pointer<ffi.Void> CreateRemoteThread(
  ffi.Pointer<ffi.Void> hProcess,
  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 (_CreateRemoteThread ??=
      _dylib.lookupFunction<_c_CreateRemoteThread, _dart_CreateRemoteThread>(
          'CreateRemoteThread'))(
    hProcess,
    lpThreadAttributes,
    dwStackSize,
    lpStartAddress,
    lpParameter,
    dwCreationFlags,
    lpThreadId,
  );
}