summaryrefslogtreecommitdiff
path: root/Source/Core/Common/HRWrap.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2023-01-23 15:52:51 +0100
committerGitHub <noreply@github.com>2023-01-23 15:52:51 +0100
commita8a4b9c6d0a845fe87ff24a1d75150c75b9eca90 (patch)
treece3032e984dccdea879695594c22814bfb75c1cf /Source/Core/Common/HRWrap.cpp
parentc798b3a1c326802fd7ac4d8f6313546bc4b196ce (diff)
parentc338f9e2a1a8a0a96b41f0927f60ac7ff530b3a9 (diff)
Merge pull request #11475 from shuffle2/comdef
windows: replace comdef dependency with winrt
Diffstat (limited to 'Source/Core/Common/HRWrap.cpp')
-rw-r--r--Source/Core/Common/HRWrap.cpp8
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