[runtime] Fix corlib out of date error with disabled COM
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / Marshal.cs
index 9c71b5409c4d28b8ddc9d485d990ebb7c2905487..03eda1eea084260238e281841151911791733aee 100644 (file)
@@ -75,6 +75,13 @@ namespace System.Runtime.InteropServices
                        return false;
                }
 
+               [MonoTODO]
+               public static void CleanupUnusedObjectsInCurrentContext ()
+               {
+                       if (Environment.IsRunningOnWindows)
+                               throw new PlatformNotSupportedException ();
+               }
+
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern static IntPtr AllocCoTaskMem (int cb);
                
@@ -1745,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 
@@ -1770,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
        }
 }