diff options
Diffstat (limited to 'Source/Core/Common/HRWrap.cpp')
| -rw-r--r-- | Source/Core/Common/HRWrap.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Core/Common/HRWrap.cpp b/Source/Core/Common/HRWrap.cpp index cfbd0e4a87..d815078fec 100644 --- a/Source/Core/Common/HRWrap.cpp +++ b/Source/Core/Common/HRWrap.cpp @@ -3,15 +3,13 @@ #include "HRWrap.h" -#include <comdef.h> -#include "Common/StringUtil.h" +#include <winrt/base.h> namespace Common { std::string GetHResultMessage(HRESULT hr) { - // See https://stackoverflow.com/a/7008111 - _com_error err(hr); - return TStrToUTF8(err.ErrorMessage()); + auto err = winrt::hresult_error(hr); + return winrt::to_string(err.message()); } } // namespace Common |
