SetThreadErrorMode function kernel32
Controls whether the system will handle the specified types of serious errors or whether the calling thread will handle them.
To learn more, see learn.microsoft.com/windows/win32/api/errhandlingapi/nf-errhandlingapi-setthreaderrormode.
Implementation
Win32Result<bool> SetThreadErrorMode(
THREAD_ERROR_MODE dwNewMode,
Pointer<Uint32>? lpOldMode,
) {
final result_ = SetThreadErrorMode_Wrapper(dwNewMode, lpOldMode ?? nullptr);
return .new(value: result_.value.i32 != FALSE, error: result_.error);
}