TerminateThread function kernel32
Terminates a thread.
To learn more, see learn.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminatethread.
Implementation
Win32Result<bool> TerminateThread(HANDLE hThread, int dwExitCode) {
resolveGetLastError();
final result_ = _TerminateThread(hThread, dwExitCode);
return .new(value: result_ != FALSE, error: GetLastError());
}