blob: cfbd0e4a87898c8d206d68ad133726eb9ce7fbfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright 2021 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "HRWrap.h"
#include <comdef.h>
#include "Common/StringUtil.h"
namespace Common
{
std::string GetHResultMessage(HRESULT hr)
{
// See https://stackoverflow.com/a/7008111
_com_error err(hr);
return TStrToUTF8(err.ErrorMessage());
}
} // namespace Common
|