Default COM visilibity to true.
authorJonathan Chambers <joncham@gmail.com>
Wed, 28 Mar 2012 01:49:31 +0000 (21:49 -0400)
committerJonathan Chambers <joncham@gmail.com>
Wed, 28 Mar 2012 01:50:52 +0000 (21:50 -0400)
mono/metadata/cominterop.c
mono/tests/cominterop.cs

index 7527d598c238de91c39a08c17655e3cdc6e34d88..8aaa6d21447ee374b2c47f3d63eaaeb4663c68a8 100644 (file)
@@ -392,7 +392,7 @@ cominterop_com_visible (MonoClass* klass)
        MonoError error;
        MonoCustomAttrInfo *cinfo;
        GPtrArray *ifaces;
-       MonoBoolean visible = 0;
+       MonoBoolean visible = 1;
 
        /* Handle the ComVisibleAttribute */
        if (!ComVisibleAttribute)
index b5be6e8de5445f524f0bf95008d9e1fae2182f4e..d541e5860c6e674f004bed8f799b99dc7eb9040d 100644 (file)
@@ -8,6 +8,7 @@ using System;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
+
 public class Tests
 {
 
@@ -653,6 +654,13 @@ public class Tests
                                }
                        }
                        #endregion // SafeArray Tests
+
+                       #region COM Visible Test
+                       TestVisible test_vis = new TestVisible();
+                       IntPtr pDisp = Marshal.GetIDispatchForObject(test_vis);
+                       if (pDisp == IntPtr.Zero)
+                               return 200;
+                       #endregion 
                }
 
         return 0;
@@ -1214,3 +1222,7 @@ public class Tests
                return 0;
        }
 }
+
+public class TestVisible
+{
+}