SetStdHandle function kernel32
Sets the handle for the specified standard device (standard input, standard output, or standard error).
To learn more, see learn.microsoft.com/windows/console/setstdhandle.
Implementation
Win32Result<bool> SetStdHandle(STD_HANDLE nStdHandle, HANDLE hHandle) {
resolveGetLastError();
final result_ = _SetStdHandle(nStdHandle, hHandle);
return .new(value: result_ != FALSE, error: GetLastError());
}