SetThreadErrorMode function kernel32

Win32Result<bool> SetThreadErrorMode(
  1. THREAD_ERROR_MODE dwNewMode,
  2. Pointer<Uint32>? lpOldMode
)

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);
}