From 4d5088dbe3bdb1a0960afefee84c3149ec88b305 Mon Sep 17 00:00:00 2001 From: Alexander Kyte Date: Tue, 10 Jan 2017 18:25:10 +0000 Subject: [PATCH] [runtime] Fix corlib out of date error with disabled COM --- .../System.Runtime.InteropServices/Marshal.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs index 1516216ddc2..03eda1eea08 100644 --- a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs +++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs @@ -1752,6 +1752,7 @@ namespace System.Runtime.InteropServices { } +#if FEATURE_COMINTEROP || MONO_COM // Copied from referencesource/mscorlib/system/runtime/interopservices/marshal.cs //==================================================================== // return the raw IUnknown* for a COM Object not related to current @@ -1777,5 +1778,18 @@ namespace System.Runtime.InteropServices //======================================================================== [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern object GetNativeActivationFactory(Type type); +#else + internal static IntPtr /* IUnknown* */ GetRawIUnknownForComObjectNoAddRef(Object o) { + throw new NotSupportedException(); + } + + internal static int GetHRForException_WinRT(Exception e) { + throw new NotSupportedException(); + } + + internal static object GetNativeActivationFactory(Type type) { + throw new NotSupportedException(); + } +#endif } } -- 2.25.1