When calling C runtime functions, they often set error information to errno. Unfortunately, there's no function to convert these error codes to HRESULT, but on Windows, it will also set _doserrno, which is a Win32 error code that can be converted to HRESULT using HRESULT_FROM_WIN32 inline function. Could C++/WinRT provide a check_errno function to automatically throw that as a winrt::hresult_error?
When calling C runtime functions, they often set error information to errno. Unfortunately, there's no function to convert these error codes to HRESULT, but on Windows, it will also set _doserrno, which is a Win32 error code that can be converted to HRESULT using HRESULT_FROM_WIN32 inline function. Could C++/WinRT provide a check_errno function to automatically throw that as a winrt::hresult_error?