7#include "../macros.hpp"
8#include "win32_error_intf.hpp"
10#include <errhandlingapi.h>
11#include <system_error>
13hi_export_module(hikogui.win32 : win32_error_intf);
15hi_export
namespace hi {
inline namespace v1 {
17enum class hresult_error : int32_t {
19 unspecified_error = E_FAIL,
20 invalid_argument = E_INVALIDARG,
28hi_export
namespace hi {
inline namespace v1 {
31 char const *name()
const noexcept override
40 switch (
static_cast<hi::hresult_error
>(code)) {
41 case hi::hresult_error::invalid_argument:
42 return condition == std::errc::invalid_argument;
51[[nodiscard]]
inline std::error_code make_error_code(hresult_error code)
noexcept
53 return {
static_cast<int>(code), global_hresult_error_category};
56[[nodiscard]]
inline hresult_error to_win32_error(win32_error code)
noexcept
58 return static_cast<hresult_error
>(__HRESULT_FROM_WIN32(
static_cast<DWORD
>(code)));
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
Definition hresult_error_intf.hpp:30