[runtime] Fix corlib out of date error with disabled COM
authorAlexander Kyte <alkyte@microsoft.com>
Tue, 10 Jan 2017 18:25:10 +0000 (18:25 +0000)
committerAlexander Kyte <alkyte@microsoft.com>
Tue, 10 Jan 2017 18:26:18 +0000 (18:26 +0000)
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs

index 1516216ddc202f9758f32eb7f794620576b18332..03eda1eea084260238e281841151911791733aee 100644 (file)
@@ -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
        }
 }