Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11475 from shuffle2/comdef
windows: replace comdef dependency with winrt
  • Loading branch information
delroth committed Jan 23, 2023
2 parents c798b3a + c338f9e commit a8a4b9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion Source/Core/AudioCommon/WASAPIStream.cpp
Expand Up @@ -7,7 +7,6 @@

// clang-format off
#include <Audioclient.h>
#include <comdef.h>
#include <mmdeviceapi.h>
#include <devpkey.h>
#include <functiondiscoverykeys_devpkey.h>
Expand Down
8 changes: 3 additions & 5 deletions Source/Core/Common/HRWrap.cpp
Expand Up @@ -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

0 comments on commit a8a4b9c

Please sign in to comment.