diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2023-01-23 06:09:01 -0800 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2023-01-23 06:09:01 -0800 |
| commit | c338f9e2a1a8a0a96b41f0927f60ac7ff530b3a9 (patch) | |
| tree | 356cabf1b89906ea04a0453448c5622c9508ed65 /Source/Core/Common/HRWrap.cpp | |
| parent | 8032a71c4cbfef2cd5677486b1db6cc94df914c5 (diff) | |
windows: replace comdef dependency with winrt
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 |
