From 370e60128379c31c93973522d23913accba82811 Mon Sep 17 00:00:00 2001 From: Sam Bent Date: Tue, 10 Dec 2019 10:17:24 -0800 Subject: [PATCH] Remove dependency on CorError.h --- .../CPP/DWriteWrapper/Common.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/DWriteWrapper/Common.h b/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/DWriteWrapper/Common.h index 98109239363..cf918834cf7 100644 --- a/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/DWriteWrapper/Common.h +++ b/src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/DWriteWrapper/Common.h @@ -12,7 +12,19 @@ using namespace System::Security; namespace MS { namespace Internal { namespace Text { namespace TextInterface { namespace Native { #include "DWrite.h" -#include "CorError.h" + +// --Begin-- Copied from CorError.h, +// which is not visible to WPF .NetCore builds without installing .NET 4.6.1 SDK +#ifndef FACILITY_URT +#define FACILITY_URT 0x13 +#endif +#ifndef EMAKEHR +#define SMAKEHR(val) MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_URT, val) +#define EMAKEHR(val) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_URT, val) +#endif + +#define COR_E_INVALIDOPERATION EMAKEHR(0x1509) +// --End-- copy from CorError.h private ref class Util sealed {