teach wil about c++/winrt exceptions by including cppwinrt.h (#2927)

It turns out that if you CATCH_LOG without including this file, and you
end up catching a C++/WinRT hresult_exception, IT TURNS IT INTO A
FAILFAST.

Fixes #2591.
Fixes #2881.
Fixes #2807.
This commit is contained in:
Dustin L. Howett (MSFT) 2019-09-30 15:52:27 -07:00 committed by GitHub
parent 5c4e8f52fb
commit a2f8a943b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 0 deletions

View file

@ -18,6 +18,8 @@
#undef GetCurrentTime
#endif
#include <wil/cppwinrt.h>
#include <unknwn.h>
#include <hstring.h>

View file

@ -15,6 +15,8 @@
// Must be included before any WinRT headers.
#include <unknwn.h>
#include <wil/cppwinrt.h>
#include "winrt/Windows.Foundation.h"
#include "winrt/Windows.Security.Credentials.h"
#include "winrt/Windows.Foundation.Collections.h"

View file

@ -18,6 +18,8 @@
#undef GetCurrentTime
#endif
#include <wil/cppwinrt.h>
#include <unknwn.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>

View file

@ -19,4 +19,5 @@
#endif
#include <unknwn.h>
#include <wil/cppwinrt.h>
#include <winrt/Windows.Foundation.h>

View file

@ -38,6 +38,9 @@ Abstract:
#ifdef GetCurrentTime
#undef GetCurrentTime
#endif
#include <wil/cppwinrt.h>
// Needed just for XamlIslands to work at all:
#include <winrt/Windows.system.h>
#include <winrt/Windows.Foundation.Collections.h>